prefix stringlengths 512 512 | suffix stringlengths 256 256 | middle stringlengths 14 229 | meta dict |
|---|---|---|---|
Queue\Attributes\WithoutRelations;
use Illuminate\Support\Reflector;
use ReflectionClass;
use ReflectionProperty;
trait SerializesModels
{
use SerializesAndRestoresModelIdentifiers;
/**
* Prepare the instance values for serialization.
*
* @return array
*/
public function __serialize()
... |
continue;
}
if (! $property->isInitialized($this)) {
continue;
}
if (method_exists($property, 'isVirtual') && $property->isVirtual()) {
continue;
| eflectionClass->getProperties(),
! is_null(Reflector::getClassAttribute($this, WithoutRelations::class, ascend: true)),
];
foreach ($properties as $property) {
if ($property->isStatic()) { | {
"filepath": "src/Illuminate/Queue/SerializesModels.php",
"language": "php",
"file_size": 2896,
"cut_index": 563,
"middle_length": 229
} |
es (1 MB).
*
* @var int
*/
const MAX_SQS_PAYLOAD_SIZE = 1048576;
/**
* The cache key prefix for extended SQS payloads.
*
* @var string
*/
const EXTENDED_PAYLOAD_CACHE_PREFIX = 'laravel:sqs-payloads:';
/**
* The Amazon SQS instance.
*
* @var \Aws\Sqs\Sq... | @var array
*/
protected $overflowStorage = [];
/**
* Create a new Amazon SQS queue instance.
*
* @param \Aws\Sqs\SqsClient $sqs
* @param string $default
* @param string $prefix
* @param string $suffix
| @var string
*/
protected $prefix;
/**
* The queue name suffix.
*
* @var string
*/
protected $suffix;
/**
* The overflow storage options for large payload offloading.
*
* | {
"filepath": "src/Illuminate/Queue/SqsQueue.php",
"language": "php",
"file_size": 14086,
"cut_index": 921,
"middle_length": 229
} |
ontracts\Queue\Queue as QueueContract;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Queue\Events\JobAttempted;
use Illuminate\Queue\Events\JobExceptionOccurred;
use Illuminate\Queue\Events\JobProcessed;
use Illuminate\Queue\Events\JobProcessing;
use Illuminate\Queue\Jobs\SyncJob;
use Illuminate\Support... | urn int
*/
public function size($queue = null)
{
return 0;
}
/**
* Get the number of pending jobs.
*
* @param string|null $queue
* @return int
*/
public function pendingSize($queue = null)
{
| public function __construct($dispatchAfterCommit = false)
{
$this->dispatchAfterCommit = $dispatchAfterCommit;
}
/**
* Get the size of the queue.
*
* @param string|null $queue
* @ret | {
"filepath": "src/Illuminate/Queue/SyncQueue.php",
"language": "php",
"file_size": 8598,
"cut_index": 716,
"middle_length": 229
} |
Illuminate\Queue\Events\WorkerPausing;
use Illuminate\Queue\Events\WorkerResuming;
use Illuminate\Queue\Events\WorkerStarting;
use Illuminate\Queue\Events\WorkerStopping;
use Illuminate\Support\Carbon;
use Throwable;
class Worker
{
use DetectsLostConnections;
const EXIT_SUCCESS = 0;
const EXIT_ERROR = 1;
... | cache repository implementation.
*
* @var \Illuminate\Contracts\Cache\Repository
*/
protected $cache;
/**
* The exception handler instance.
*
* @var \Illuminate\Contracts\Debug\ExceptionHandler
*/
protected | @var \Illuminate\Contracts\Queue\Factory
*/
protected $manager;
/**
* The event dispatcher instance.
*
* @var \Illuminate\Contracts\Events\Dispatcher
*/
protected $events;
/**
* The | {
"filepath": "src/Illuminate/Queue/Worker.php",
"language": "php",
"file_size": 32546,
"cut_index": 1331,
"middle_length": 229
} |
ions
{
/**
* The name of the worker.
*
* @var string
*/
public $name;
/**
* The number of seconds to wait before retrying a job that encountered an uncaught exception.
*
* @var int|int[]
*/
public $backoff;
/**
* The maximum amount of RAM the worker may... | /**
* The maximum number of times a job may be attempted.
*
* @var int
*/
public $maxTries;
/**
* Indicates if the worker should run in maintenance mode.
*
* @var bool
*/
public $force;
/**
* | * The number of seconds to wait in between polling the queue.
*
* @var int
*/
public $sleep;
/**
* The number of seconds to rest between jobs.
*
* @var int
*/
public $rest;
| {
"filepath": "src/Illuminate/Queue/WorkerOptions.php",
"language": "php",
"file_size": 2723,
"cut_index": 563,
"middle_length": 229
} |
te\Queue\Console;
use Illuminate\Console\MigrationGeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
use function Illuminate\Filesystem\join_paths;
#[AsCommand(name: 'make:queue-batches-table', aliases: ['queue:batches-table'])]
class BatchesTableCommand extends MigrationGeneratorCommand
{
/**
... | **
* Get the migration table name.
*
* @return string
*/
protected function migrationTableName()
{
return $this->laravel['config']['queue.batching.table'] ?? 'job_batches';
}
/**
* Get the path to the migra | */
protected $aliases = ['queue:batches-table'];
/**
* The console command description.
*
* @var string
*/
protected $description = 'Create a migration for the batches database table';
/ | {
"filepath": "src/Illuminate/Queue/Console/BatchesTableCommand.php",
"language": "php",
"file_size": 1874,
"cut_index": 537,
"middle_length": 229
} |
uminate\Console\Command;
use Illuminate\Console\ConfirmableTrait;
use Illuminate\Console\Prohibitable;
use Illuminate\Contracts\Queue\ClearableQueue;
use Illuminate\Support\Str;
use ReflectionClass;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Compone... | /**
* Execute the console command.
*
* @return int|null
*/
public function handle()
{
if ($this->isProhibited() ||
! $this->confirmToProceed()) {
return 1;
}
$connection = $this | * @var string
*/
protected $name = 'queue:clear';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Delete all of the jobs from the specified queue';
| {
"filepath": "src/Illuminate/Queue/Console/ClearCommand.php",
"language": "php",
"file_size": 2871,
"cut_index": 563,
"middle_length": 229
} |
te\Queue\Console;
use Illuminate\Console\MigrationGeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
use function Illuminate\Filesystem\join_paths;
#[AsCommand(name: 'make:queue-failed-table', aliases: ['queue:failed-table'])]
class FailedTableCommand extends MigrationGeneratorCommand
{
/**
... | /**
* Get the migration table name.
*
* @return string
*/
protected function migrationTableName()
{
return $this->laravel['config']['queue.failed.table'];
}
/**
* Get the path to the migration stub file | */
protected $aliases = ['queue:failed-table'];
/**
* The console command description.
*
* @var string
*/
protected $description = 'Create a migration for the failed queue jobs database table';
| {
"filepath": "src/Illuminate/Queue/Console/FailedTableCommand.php",
"language": "php",
"file_size": 1864,
"cut_index": 537,
"middle_length": 229
} |
<?php
namespace Illuminate\Queue\Console;
use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'queue:flush')]
class FlushFailedCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $signature = 'queue:flush ... | on('hours')) {
$this->components->info("All jobs that failed more than {$this->option('hours')} hours ago have been deleted successfully.");
return;
}
$this->components->info('All failed jobs deleted successfully.' | ailed queue jobs';
/**
* Execute the console command.
*
* @return void
*/
public function handle()
{
$this->laravel['queue.failer']->flush($this->option('hours'));
if ($this->opti | {
"filepath": "src/Illuminate/Queue/Console/FlushFailedCommand.php",
"language": "php",
"file_size": 1008,
"cut_index": 512,
"middle_length": 229
} |
onsole;
use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'queue:forget')]
class ForgetFailedCommand extends Command
{
/**
* The console command signature.
*
* @var string
*/
protected $signature = 'queue:forget {id : The ID of the failed ... | unction handle()
{
if ($this->laravel['queue.failer']->forget($this->argument('id'))) {
$this->components->info('Failed job deleted successfully.');
} else {
$this->components->error('No failed job matches the gi |
*
* @return int|null
*/
public f | {
"filepath": "src/Illuminate/Queue/Console/ForgetFailedCommand.php",
"language": "php",
"file_size": 907,
"cut_index": 547,
"middle_length": 52
} |
pace Illuminate\Translation;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;
class TranslationServiceProvider extends ServiceProvider implements DeferrableProvider
{
/**
* Register the service provider.
*
* @return void
*/
public function regist... | $locale = $app->getLocale();
$trans = new Translator($loader, $locale);
$trans->setFallback($app->getFallbackLocale());
return $trans;
});
}
/**
* Register the translation line loader.
| e translator component, we'll need to set the default
// locale as well as the fallback locale. So, we'll grab the application
// configuration so we can easily get both of these values from there.
| {
"filepath": "src/Illuminate/Translation/TranslationServiceProvider.php",
"language": "php",
"file_size": 1454,
"cut_index": 524,
"middle_length": 229
} |
to tweak each of these messages here.
|
*/
'accepted' => 'The :attribute field must be accepted.',
'accepted_if' => 'The :attribute field must be accepted when :other is :value.',
'active_url' => 'The :attribute field must be a valid URL.',
'after' => 'The :attribute field must be a date after... | e :attribute field must be an array.',
'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.',
'before' => 'The :attribute field must be a date before :date.',
'before_or_equal' => 'The :attribute f | tribute field must only contain letters, numbers, dashes, and underscores.',
'alpha_num' => 'The :attribute field must only contain letters and numbers.',
'any_of' => 'The :attribute field is invalid.',
'array' => 'Th | {
"filepath": "src/Illuminate/Translation/lang/en/validation.php",
"language": "php",
"file_size": 11964,
"cut_index": 921,
"middle_length": 229
} |
e Illuminate\Bus\Batchable;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Laravel\SerializableClosure\SerializableClosure;
use ReflectionFunction;
class CallQueuedClosure implements ShouldQueue
{
... | ar array
*/
public $failureCallbacks = [];
/**
* Indicate if the job should be deleted when models are missing.
*
* @var bool
*/
public $deleteWhenMissingModels = true;
/**
* Create a new job instance.
* | Closure
*/
public $closure;
/**
* The name assigned to the job.
*
* @var string|null
*/
public $name = null;
/**
* The callbacks that should be executed on failure.
*
* @v | {
"filepath": "src/Illuminate/Queue/CallQueuedClosure.php",
"language": "php",
"file_size": 3039,
"cut_index": 563,
"middle_length": 229
} |
on\Encrypter;
use Illuminate\Contracts\Queue\Job;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldBeUniqueUntilProcessing;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Events\CallQueuedListener;
use Illuminate\Log\Context\Repository as ContextRepository;
us... | mmand currently being processed.
*
* @var mixed
*/
protected $runningCommand;
/**
* Create a new handler instance.
*
* @param \Illuminate\Contracts\Bus\Dispatcher $dispatcher
* @param \Illuminate\Contracts\Con | \Illuminate\Contracts\Bus\Dispatcher
*/
protected $dispatcher;
/**
* The container instance.
*
* @var \Illuminate\Contracts\Container\Container
*/
protected $container;
/**
* The co | {
"filepath": "src/Illuminate/Queue/CallQueuedHandler.php",
"language": "php",
"file_size": 13185,
"cut_index": 921,
"middle_length": 229
} |
ntException;
use PHPUnit\Framework\Assert as PHPUnit;
use RuntimeException;
use Throwable;
trait InteractsWithQueue
{
use InteractsWithTime;
/**
* The underlying queue job instance.
*
* @var \Illuminate\Contracts\Queue\Job|null
*/
public $job;
/**
* Get the number of times th... | ram \Throwable|string|null $exception
* @return void
*
* @throws \InvalidArgumentException
*/
public function fail($exception = null)
{
if (is_string($exception)) {
$exception = new ManuallyFailedException( | om the queue.
*
* @return void
*/
public function delete()
{
if ($this->job) {
return $this->job->delete();
}
}
/**
* Fail the job from the queue.
*
* @pa | {
"filepath": "src/Illuminate/Queue/InteractsWithQueue.php",
"language": "php",
"file_size": 7159,
"cut_index": 716,
"middle_length": 229
} |
nerOptions extends WorkerOptions
{
/**
* The environment the worker should run in.
*
* @var string
*/
public $environment;
/**
* Create a new listener options instance.
*
* @param string $name
* @param string|null $environment
* @param int|int[] $backoff
... | l, $backoff = 0, $memory = 128, $timeout = 60, $sleep = 3, $maxTries = 1, $force = false, $rest = 0)
{
$this->environment = $environment;
parent::__construct($name, $backoff, $memory, $timeout, $sleep, $maxTries, $force, false, 0, 0, $ | on __construct($name = 'default', $environment = nul | {
"filepath": "src/Illuminate/Queue/ListenerOptions.php",
"language": "php",
"file_size": 882,
"cut_index": 559,
"middle_length": 52
} |
ate\Support\Collection;
class NullQueue extends Queue implements QueueContract
{
/**
* Get the size of the queue.
*
* @param string|null $queue
* @return int
*/
public function size($queue = null)
{
return 0;
}
/**
* Get the number of pending jobs.
*
... |
* @return int
*/
public function reservedSize($queue = null)
{
return 0;
}
/**
* Get the pending jobs for the given queue.
*
* @param string|null $queue
* @return \Illuminate\Support\Collection
| * @param string|null $queue
* @return int
*/
public function delayedSize($queue = null)
{
return 0;
}
/**
* Get the number of reserved jobs.
*
* @param string|null $queue | {
"filepath": "src/Illuminate/Queue/NullQueue.php",
"language": "php",
"file_size": 3714,
"cut_index": 614,
"middle_length": 229
} |
ontract
{
use ResolvesQueueRoutes;
/**
* The application instance.
*
* @var \Illuminate\Contracts\Foundation\Application
*/
protected $app;
/**
* The array of resolved queue connections.
*
* @var array
*/
protected $connections = [];
/**
* The arra... | * @return void
*/
public function before($callback)
{
$this->app['events']->listen(Events\JobProcessing::class, $callback);
}
/**
* Register an event listener for the after job event.
*
* @param mixed $callbac | s\Foundation\Application $app
*/
public function __construct($app)
{
$this->app = $app;
}
/**
* Register an event listener for the before job event.
*
* @param mixed $callback
| {
"filepath": "src/Illuminate/Queue/QueueManager.php",
"language": "php",
"file_size": 10733,
"cut_index": 921,
"middle_length": 229
} |
ue\Connectors\DeferredConnector;
use Illuminate\Queue\Connectors\FailoverConnector;
use Illuminate\Queue\Connectors\NullConnector;
use Illuminate\Queue\Connectors\RedisConnector;
use Illuminate\Queue\Connectors\SqsConnector;
use Illuminate\Queue\Connectors\SyncConnector;
use Illuminate\Queue\Failed\DatabaseFailedJobPro... | rviceProvider implements DeferrableProvider
{
use SerializesAndRestoresModelIdentifiers;
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->configureSerializableClosureU | \Failed\NullFailedJobProvider;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Facade;
use Illuminate\Support\ServiceProvider;
use Laravel\SerializableClosure\SerializableClosure;
class QueueServiceProvider extends Se | {
"filepath": "src/Illuminate/Queue/QueueServiceProvider.php",
"language": "php",
"file_size": 11871,
"cut_index": 921,
"middle_length": 229
} |
.
*
* @param array|string $views
* @param \Closure|string $callback
* @return array
*/
public function creator($views, $callback)
{
$creators = [];
foreach ((array) $views as $view) {
$creators[] = $this->addViewEvent($view, $callback, 'creating: ');
... | $registered;
}
/**
* Register a view composer event.
*
* @param array|string $views
* @param \Closure|string $callback
* @return array
*/
public function composer($views, $callback)
{
$composers = | composers(array $composers)
{
$registered = [];
foreach ($composers as $callback => $views) {
$registered = array_merge($registered, $this->composer($views, $callback));
}
return | {
"filepath": "src/Illuminate/View/Concerns/ManagesEvents.php",
"language": "php",
"file_size": 5110,
"cut_index": 716,
"middle_length": 229
} |
<?php
namespace Illuminate\View\Compilers\Concerns;
trait CompilesContexts
{
/**
* Compile the context statements into valid PHP.
*
* @param string $expression
* @return string
*/
protected function compileContext($expression)
{
$expression = $this->stripParentheses($exp... | return '<?php unset($value);
if (isset($__contextPrevious) && !empty($__contextPrevious)) { $value = array_pop($__contextPrevious); }
if (isset($__contextPrevious) && empty($__contextPrevious)) { unset($__contextPrevious); }
endif;
unset($__contextArgs | ontextArgs[0]); ?>';
}
/**
* Compile the endcontext statements into valid PHP.
*
* @param string $expression
* @return string
*/
protected function compileEndcontext($expression)
{
| {
"filepath": "src/Illuminate/View/Compilers/Concerns/CompilesContexts.php",
"language": "php",
"file_size": 1013,
"cut_index": 512,
"middle_length": 229
} |
of the last section that was started.
*
* @var string
*/
protected $lastSection;
/**
* Compile the extends statements into valid PHP.
*
* @param string $expression
* @return string
*/
protected function compileExtends($expression)
{
$expression = $this-... | pression)
{
$expression = $this->stripParentheses($expression);
$echo = "<?php echo \$__env->first({$expression}, array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>";
$this->footer[] = $echo;
| oter[] = $echo;
return '';
}
/**
* Compile the extends-first statements into valid PHP.
*
* @param string $expression
* @return string
*/
protected function compileExtendsFirst($ex | {
"filepath": "src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php",
"language": "php",
"file_size": 3069,
"cut_index": 614,
"middle_length": 229
} |
roxy<TKey, TValue> $min
* @property-read HigherOrderCollectionProxy<TKey, TValue> $partition
* @property-read HigherOrderCollectionProxy<TKey, TValue> $percentage
* @property-read HigherOrderCollectionProxy<TKey, TValue> $reject
* @property-read HigherOrderCollectionProxy<TKey, TValue> $skipUntil
* @property-read ... | lectionProxy<TKey, TValue> $takeWhile
* @property-read HigherOrderCollectionProxy<TKey, TValue> $unique
* @property-read HigherOrderCollectionProxy<TKey, TValue> $unless
* @property-read HigherOrderCollectionProxy<TKey, TValue> $until
* @property-read | erty-read HigherOrderCollectionProxy<TKey, TValue> $sortByDesc
* @property-read HigherOrderCollectionProxy<TKey, TValue> $sum
* @property-read HigherOrderCollectionProxy<TKey, TValue> $takeUntil
* @property-read HigherOrderCol | {
"filepath": "src/Illuminate/Collections/Traits/EnumeratesValues.php",
"language": "php",
"file_size": 34425,
"cut_index": 2151,
"middle_length": 229
} |
te\Translation;
use Illuminate\Contracts\Translation\Loader;
class ArrayLoader implements Loader
{
/**
* All of the translation messages.
*
* @var array
*/
protected $messages = [];
/**
* Load the messages for the given locale.
*
* @param string $locale
* @param ... | lic function addNamespace($namespace, $hint)
{
//
}
/**
* Add a new JSON path to the loader.
*
* @param string $path
* @return void
*/
public function addJsonPath($path)
{
//
}
/**
| return $this->messages[$namespace][$locale][$group] ?? [];
}
/**
* Add a new namespace to the loader.
*
* @param string $namespace
* @param string $hint
* @return void
*/
pub | {
"filepath": "src/Illuminate/Translation/ArrayLoader.php",
"language": "php",
"file_size": 1631,
"cut_index": 537,
"middle_length": 229
} |
ements Loader
{
/**
* The filesystem instance.
*
* @var \Illuminate\Filesystem\Filesystem
*/
protected $files;
/**
* The default paths for the loader.
*
* @var array
*/
protected $paths;
/**
* All of the registered paths to JSON translation files.
... | $this->files = $files;
$this->paths = is_string($path) ? [$path] : $path;
}
/**
* Load the messages for the given locale.
*
* @param string $locale
* @param string $group
* @param string|null $namespace
| * Create a new file loader instance.
*
* @param \Illuminate\Filesystem\Filesystem $files
* @param array|string $path
*/
public function __construct(Filesystem $files, array|string $path)
{
| {
"filepath": "src/Illuminate/Translation/FileLoader.php",
"language": "php",
"file_size": 5608,
"cut_index": 716,
"middle_length": 229
} |
if (($value = $this->extract($segments, $number)) !== null) {
return trim($value);
}
$segments = $this->stripConditions($segments);
$pluralIndex = $this->getPluralIndex($locale, $number);
if (count($segments) === 1 || ! isset($segments[$pluralIndex])) {
... | {
return $line;
}
}
}
/**
* Get the translation string if the condition matches.
*
* @param string $part
* @param int $number
* @return mixed
*/
private function extractFro | * @param int|float $number
* @return mixed
*/
private function extract($segments, $number)
{
foreach ($segments as $part) {
if (! is_null($line = $this->extractFromString($part, $number))) | {
"filepath": "src/Illuminate/Translation/MessageSelector.php",
"language": "php",
"file_size": 11926,
"cut_index": 921,
"middle_length": 229
} |
e;
use Pheanstalk\Pheanstalk;
use Pheanstalk\Values\Job;
use Pheanstalk\Values\JobId;
use Pheanstalk\Values\TubeName;
class BeanstalkdQueue extends Queue implements QueueContract
{
/**
* The Pheanstalk instance.
*
* @var \Pheanstalk\Contract\PheanstalkManagerInterface&\Pheanstalk\Contract\Pheanstalk... | protected $blockFor;
/**
* Create a new Beanstalkd queue instance.
*
* @param \Pheanstalk\Contract\PheanstalkManagerInterface&\Pheanstalk\Contract\PheanstalkPublisherInterface&\Pheanstalk\Contract\PheanstalkSubscriberInterface $phean | tected $default;
/**
* The "time to run" for all pushed jobs.
*
* @var int
*/
protected $timeToRun;
/**
* The maximum number of seconds to block for a job.
*
* @var int
*/
| {
"filepath": "src/Illuminate/Queue/BeanstalkdQueue.php",
"language": "php",
"file_size": 8741,
"cut_index": 716,
"middle_length": 229
} |
.
*
* @var string
*/
protected $default;
/**
* The expiration time of a job.
*
* @var int|null
*/
protected $retryAfter = 60;
/**
* The cached lock type for popping jobs.
*
* @var string|bool|null
*/
protected $lockForPopping = null;
/**
... | alse,
) {
$this->table = $table;
$this->default = $default;
$this->database = $database;
$this->retryAfter = $retryAfter;
$this->dispatchAfterCommit = $dispatchAfterCommit;
}
/**
* Get the size of t | $retryAfter
* @param bool $dispatchAfterCommit
*/
public function __construct(
Connection $database,
$table,
$default = 'default',
$retryAfter = 60,
$dispatchAfterCommit = f | {
"filepath": "src/Illuminate/Queue/DatabaseQueue.php",
"language": "php",
"file_size": 17705,
"cut_index": 1331,
"middle_length": 229
} |
the size of queue.
*
* KEYS[1] - The name of the primary queue
* KEYS[2] - The name of the "delayed" queue
* KEYS[3] - The name of the "reserved" queue
*
* @return string
*/
public static function size()
{
return <<<'LUA'
return redis.call('llen', KEYS[1]) + redis.cal... | ()
{
return <<<'LUA'
-- Push the job onto the queue...
redis.call('rpush', KEYS[1], ARGV[1])
-- Push a notification onto the "notify" queue...
redis.call('rpush', KEYS[2], 1)
LUA;
}
/**
* Get the Lua script for pushing delayed job | ample: queues:foo
* KEYS[2] - The notification list for the queue we are pushing jobs onto, for example: queues:foo:notify
* ARGV[1] - The job payload
*
* @return string
*/
public static function push | {
"filepath": "src/Illuminate/Queue/LuaScripts.php",
"language": "php",
"file_size": 4923,
"cut_index": 614,
"middle_length": 229
} |
es
{
/**
* The mapping of class names to their default routes.
*
* @var array<class-string, array|string>
*/
protected $routes = [];
/**
* Get the queue connection that a given queueable instance should be routed to.
*
* @param object $queueable
* @return string|nu... | lic function getQueue($queueable)
{
$route = $this->getRoute($queueable);
if (is_null($route)) {
return;
}
return is_string($route)
? $route
: $route[1];
}
/**
* Get th | ring($route)
? null
: $route[0];
}
/**
* Get the queue that a given queueable instance should be routed to.
*
* @param object $queueable
* @return string|null
*/
pub | {
"filepath": "src/Illuminate/Queue/QueueRoutes.php",
"language": "php",
"file_size": 2330,
"cut_index": 563,
"middle_length": 229
} |
usterConnection;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
class RedisQueue extends Queue implements QueueContract, ClearableQueue
{
/**
* The Redis factory implementation.
*
* @var \Illuminate\Contracts\Redis\Factory
*/
protected $redis;
/**
* The connection ... | /**
* The batch size to use when migrating delayed / expired jobs onto the primary queue.
*
* Negative values are infinite.
*
* @var int
*/
protected $migrationBatchSize = -1;
/**
* Indicates if a secondary q | expiration time of a job.
*
* @var int|null
*/
protected $retryAfter = 60;
/**
* The maximum number of seconds to block for a job.
*
* @var int|null
*/
protected $blockFor = null;
| {
"filepath": "src/Illuminate/Queue/RedisQueue.php",
"language": "php",
"file_size": 16215,
"cut_index": 921,
"middle_length": 229
} |
te\Translation;
trait CreatesPotentiallyTranslatedStrings
{
/**
* Create a pending potentially translated string.
*
* @param string $attribute
* @param string|null $message
* @return \Illuminate\Translation\PotentiallyTranslatedString
*/
protected function pendingPotentiallyTr... | ject destructs.
*
* @var \Closure
*/
protected $destructor;
/**
* Create a new pending potentially translated string.
*
* @param string $message
| ttribute] = $message;
return new class($message ?? $attribute, $this->validator->getTranslator(), $destructor) extends PotentiallyTranslatedString
{
/**
* The callback to call when the ob | {
"filepath": "src/Illuminate/Translation/CreatesPotentiallyTranslatedStrings.php",
"language": "php",
"file_size": 1640,
"cut_index": 537,
"middle_length": 229
} |
luminate\Support\enum_value;
class Translator extends NamespacedItemResolver implements TranslatorContract
{
use Macroable, ReflectsClosures;
/**
* The loader implementation.
*
* @var \Illuminate\Contracts\Translation\Loader
*/
protected $loader;
/**
* The default locale bein... | */
protected $selector;
/**
* The callable that should be invoked to determine applicable locales.
*
* @var callable
*/
protected $determineLocalesUsing;
/**
* The custom rendering callbacks for stringable objects | fallback;
/**
* The array of loaded translation groups.
*
* @var array
*/
protected $loaded = [];
/**
* The message selector.
*
* @var \Illuminate\Translation\MessageSelector
| {
"filepath": "src/Illuminate/Translation/Translator.php",
"language": "php",
"file_size": 16099,
"cut_index": 921,
"middle_length": 229
} |
lluminate\Support\Collection;
use RuntimeException;
use Throwable;
class FailoverQueue extends Queue implements QueueContract
{
/**
* The queues which failed on the last action.
*
* @var list<string>
*/
protected array $failingQueues = [];
/**
* Create a new failover queue instanc... | *
* Get the number of pending jobs.
*
* @param string|null $queue
* @return int
*/
public function pendingSize($queue = null)
{
return $this->manager->connection($this->connections[0])->pendingSize($queue);
}
| e size of the queue.
*
* @param string|null $queue
* @return int
*/
public function size($queue = null)
{
return $this->manager->connection($this->connections[0])->size($queue);
}
/* | {
"filepath": "src/Illuminate/Queue/FailoverQueue.php",
"language": "php",
"file_size": 6247,
"cut_index": 716,
"middle_length": 229
} |
gable;
class PotentiallyTranslatedString implements Stringable
{
/**
* The string that may be translated.
*
* @var string
*/
protected $string;
/**
* The translated string.
*
* @var string|null
*/
protected $translation;
/**
* The validator that may pe... | = $translator;
}
/**
* Translate the string.
*
* @param array $replace
* @param string|null $locale
* @return $this
*/
public function translate($replace = [], $locale = null)
{
$this->translation | * @param string $string
* @param \Illuminate\Contracts\Translation\Translator $translator
*/
public function __construct($string, $translator)
{
$this->string = $string;
$this->translator | {
"filepath": "src/Illuminate/Translation/PotentiallyTranslatedString.php",
"language": "php",
"file_size": 2071,
"cut_index": 563,
"middle_length": 229
} |
eAfterCommit;
use Illuminate\Queue\Attributes\Backoff;
use Illuminate\Queue\Attributes\DeleteWhenMissingModels;
use Illuminate\Queue\Attributes\FailOnTimeout;
use Illuminate\Queue\Attributes\MaxExceptions;
use Illuminate\Queue\Attributes\ReadsQueueAttributes;
use Illuminate\Queue\Attributes\Timeout;
use Illuminate\Queu... | Container\Container
*/
protected $container;
/**
* The connection name for the queue.
*
* @var string
*/
protected $connectionName;
/**
* The original configuration for the queue.
*
* @var array
| eractsWithTime;
use Illuminate\Support\Str;
use RuntimeException;
use Throwable;
abstract class Queue
{
use InteractsWithTime, ReadsQueueAttributes;
/**
* The IoC container instance.
*
* @var \Illuminate\ | {
"filepath": "src/Illuminate/Queue/Queue.php",
"language": "php",
"file_size": 15028,
"cut_index": 921,
"middle_length": 229
} |
**
* The command working path.
*
* @var string
*/
protected $commandPath;
/**
* The environment the workers should run under.
*
* @var string
*/
protected $environment;
/**
* The amount of seconds to wait before polling the queue.
*
* @var int
... | h)
{
$this->commandPath = $commandPath;
}
/**
* Get the PHP binary.
*
* @return string
*/
protected function phpBinary()
{
return php_binary();
}
/**
* Get the Artisan binary.
*
| handler callback.
*
* @var \Closure|null
*/
protected $outputHandler;
/**
* Create a new queue listener.
*
* @param string $commandPath
*/
public function __construct($commandPat | {
"filepath": "src/Illuminate/Queue/Listener.php",
"language": "php",
"file_size": 5738,
"cut_index": 716,
"middle_length": 229
} |
uminate\Bus\BatchRepository;
use Illuminate\Console\Command;
use Illuminate\Contracts\Console\Isolatable;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'queue:retry-batch')]
class RetryBatchCommand extends Command implements Isolatable
{
/**
* The console command signature.
*
... | {
$batchesFound = count($ids = $this->getBatchJobIds()) > 0;
if ($batchesFound) {
$this->components->info('Pushing failed batch jobs back onto the queue.');
}
foreach ($ids as $batchId) {
$batch | ommand description.
*
* @var string
*/
protected $description = 'Retry the failed jobs for a batch';
/**
* Execute the console command.
*
* @return void
*/
public function handle()
| {
"filepath": "src/Illuminate/Queue/Console/RetryBatchCommand.php",
"language": "php",
"file_size": 2246,
"cut_index": 563,
"middle_length": 229
} |
te\Queue\Console;
use Illuminate\Console\MigrationGeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
use function Illuminate\Filesystem\join_paths;
#[AsCommand(name: 'make:queue-table', aliases: ['queue:table'])]
class TableCommand extends MigrationGeneratorCommand
{
/**
* The console comm... | me.
*
* @return string
*/
protected function migrationTableName()
{
return $this->laravel['config']['queue.connections.database.table'];
}
/**
* Get the path to the migration stub file.
*
* @return str | = ['queue:table'];
/**
* The console command description.
*
* @var string
*/
protected $description = 'Create a migration for the queue jobs database table';
/**
* Get the migration table na | {
"filepath": "src/Illuminate/Queue/Console/TableCommand.php",
"language": "php",
"file_size": 1823,
"cut_index": 537,
"middle_length": 229
} |
se Illuminate\Support\Carbon;
use Illuminate\Support\InteractsWithTime;
use Illuminate\Support\Stringable;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Terminal;
use Throwable;
use function Termwind\terminal;
#[AsCommand(name: 'queue:work')]
class WorkCommand extends Command
{
... | in daemon mode (Deprecated)}
{--once : Only process the next job on the queue}
{--stop-when-empty : Stop when the queue is empty}
{--stop-when-empty-for=0 : Stop when no jo | the queue connection to work}
{--name=default : The name of the worker}
{--queue= : The names of the queues to work}
{--daemon : Run the worker | {
"filepath": "src/Illuminate/Queue/Console/WorkCommand.php",
"language": "php",
"file_size": 12942,
"cut_index": 921,
"middle_length": 229
} |
RateLimiting\Unlimited;
use Illuminate\Container\Container;
use Illuminate\Support\Collection;
use function Illuminate\Support\enum_value;
class RateLimited
{
/**
* The rate limiter instance.
*
* @var \Illuminate\Cache\RateLimiter
*/
protected $limiter;
/**
* The name of the rate... | reate a new middleware instance.
*
* @param \UnitEnum|string $limiterName
*/
public function __construct($limiterName)
{
$this->limiter = Container::getInstance()->make(RateLimiter::class);
$this->limiterName = (st | r \DateTimeInterface|int|null
*/
public $releaseAfter;
/**
* Indicates if the job should be released if the limit is exceeded.
*
* @var bool
*/
public $shouldRelease = true;
/**
* C | {
"filepath": "src/Illuminate/Queue/Middleware/RateLimited.php",
"language": "php",
"file_size": 3872,
"cut_index": 614,
"middle_length": 229
} |
p
{
/**
* @param bool $param Whether the job should be skipped.
*/
public function __construct(protected bool $skip = false)
{
}
/**
* Apply the middleware if the given condition is truthy.
*
* @param bool|(\Closure(): bool) $condition
*/
public static functio... | ublic static function unless(Closure|bool $condition): static
{
return new static(! value($condition));
}
/**
* Handle the job.
*/
public function handle(mixed $job, callable $next): mixed
{
if ($this->skip) { | m bool|(\Closure(): bool) $condition
*/
p | {
"filepath": "src/Illuminate/Queue/Middleware/Skip.php",
"language": "php",
"file_size": 964,
"cut_index": 582,
"middle_length": 52
} |
Illuminate\Container\Container;
use Illuminate\Contracts\Redis\Connection;
use Illuminate\Contracts\Redis\Factory as Redis;
use Illuminate\Redis\Limiters\DurationLimiter;
use Illuminate\Support\InteractsWithTime;
use Throwable;
class ThrottlesExceptionsWithRedis extends ThrottlesExceptions
{
use InteractsWithTime;... | * Process the job.
*
* @param mixed $job
* @param callable $next
* @return mixed
*
* @throws \Throwable
*/
public function handle($job, $next)
{
$this->redis = Container::getInstance()
->m | .
*
* @var string|null
*/
protected $connectionName = null;
/**
* The rate limiter instance.
*
* @var \Illuminate\Redis\Limiters\DurationLimiter
*/
protected $limiter;
/**
| {
"filepath": "src/Illuminate/Queue/Middleware/ThrottlesExceptionsWithRedis.php",
"language": "php",
"file_size": 2454,
"cut_index": 563,
"middle_length": 229
} |
hp
namespace Illuminate\Queue\Connectors;
use Illuminate\Queue\BeanstalkdQueue;
use Pheanstalk\Contract\SocketFactoryInterface;
use Pheanstalk\Pheanstalk;
use Pheanstalk\Values\Timeout;
class BeanstalkdConnector implements ConnectorInterface
{
/**
* Establish a queue connection.
*
* @param array ... | nstance.
*
* @param array $config
* @return \Pheanstalk\Pheanstalk
*/
protected function pheanstalk(array $config)
{
return Pheanstalk::create(
$config['host'],
$config['port'] ?? SocketFactoryI | $config['queue'],
$config['retry_after'] ?? Pheanstalk::DEFAULT_TTR,
$config['block_for'] ?? 0,
$config['after_commit'] ?? null
);
}
/**
* Create a Pheanstalk i | {
"filepath": "src/Illuminate/Queue/Connectors/BeanstalkdConnector.php",
"language": "php",
"file_size": 1123,
"cut_index": 515,
"middle_length": 229
} |
pace Illuminate\Queue\Connectors;
use Illuminate\Contracts\Redis\Factory as Redis;
use Illuminate\Queue\RedisQueue;
class RedisConnector implements ConnectorInterface
{
/**
* The Redis database instance.
*
* @var \Illuminate\Contracts\Redis\Factory
*/
protected $redis;
/**
* The ... | tablish a queue connection.
*
* @param array $config
* @return \Illuminate\Contracts\Queue\Queue
*/
public function connect(array $config)
{
return new RedisQueue(
$this->redis, $config['queue'],
| tory $redis
* @param string|null $connection
*/
public function __construct(Redis $redis, $connection = null)
{
$this->redis = $redis;
$this->connection = $connection;
}
/**
* Es | {
"filepath": "src/Illuminate/Queue/Connectors/RedisConnector.php",
"language": "php",
"file_size": 1253,
"cut_index": 524,
"middle_length": 229
} |
Queue\Job as JobContract;
use Pheanstalk\Contract\JobIdInterface;
use Pheanstalk\Pheanstalk;
class BeanstalkdJob extends Job implements JobContract
{
/**
* The Pheanstalk instance.
*
* @var \Pheanstalk\Contract\PheanstalkManagerInterface&\Pheanstalk\Contract\PheanstalkPublisherInterface&\Pheanstalk\... | act\PheanstalkSubscriberInterface $pheanstalk
* @param \Pheanstalk\Contract\JobIdInterface $job
* @param string $connectionName
* @param string $queue
*/
public function __construct(Container $container, $pheanstalk, JobIdInt | * Create a new job instance.
*
* @param \Illuminate\Container\Container $container
* @param \Pheanstalk\Contract\PheanstalkManagerInterface&\Pheanstalk\Contract\PheanstalkPublisherInterface&\Pheanstalk\Contr | {
"filepath": "src/Illuminate/Queue/Jobs/BeanstalkdJob.php",
"language": "php",
"file_size": 3143,
"cut_index": 614,
"middle_length": 229
} |
;
use Illuminate\Support\Collection;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'queue:failed')]
class ListFailedCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $signature = 'queue:failed
{--json : ... | */
public function handle()
{
$jobs = $this->getFailedJobs();
if ($this->option('json')) {
return $this->displayFailedJobsAsJson($jobs);
}
if (count($jobs) === 0) {
return $this->compone | * The table headers for the command.
*
* @var string[]
*/
protected $headers = ['ID', 'Connection', 'Queue', 'Class', 'Failed At'];
/**
* Execute the console command.
*
* @return void
| {
"filepath": "src/Illuminate/Queue/Console/ListFailedCommand.php",
"language": "php",
"file_size": 3794,
"cut_index": 614,
"middle_length": 229
} |
lluminate\Support\Carbon;
use Illuminate\Support\Collection;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'queue:monitor')]
class MonitorCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $signature = 'queue:monitor
... | manager instance.
*
* @var \Illuminate\Contracts\Queue\Factory
*/
protected $manager;
/**
* The events dispatcher instance.
*
* @var \Illuminate\Contracts\Events\Dispatcher
*/
protected $events;
/**
| {--json : Output the queue size as JSON}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Monitor the size of the specified queues';
/**
* The queue | {
"filepath": "src/Illuminate/Queue/Console/MonitorCommand.php",
"language": "php",
"file_size": 5180,
"cut_index": 716,
"middle_length": 229
} |
uminate\Bus\BatchRepository;
use Illuminate\Bus\DatabaseBatchRepository;
use Illuminate\Bus\PrunableBatchRepository;
use Illuminate\Console\Command;
use Illuminate\Support\Carbon;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'queue:prune-batches')]
class PruneBatchesCommand extends Command
{
... | *
* @var string
*/
protected $description = 'Prune stale entries from the batches database';
/**
* Execute the console command.
*
* @return void
*/
public function handle()
{
$repository = $this-> | data}
{--unfinished= : The number of hours to retain unfinished batch data }
{--cancelled= : The number of hours to retain cancelled batch data }';
/**
* The console command description.
| {
"filepath": "src/Illuminate/Queue/Console/PruneBatchesCommand.php",
"language": "php",
"file_size": 2042,
"cut_index": 563,
"middle_length": 229
} |
namespace Illuminate\Queue\Console;
use Illuminate\Console\Command;
use Illuminate\Queue\Failed\PrunableFailedJobProvider;
use Illuminate\Support\Carbon;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'queue:prune-failed')]
class PruneFailedJobsCommand extends Command
{
/**
* The conso... | */
public function handle()
{
$failer = $this->laravel['queue.failer'];
if ($failer instanceof PrunableFailedJobProvider) {
$count = $failer->prune(Carbon::now()->subHours($this->option('hours')));
} else { | * The console command description.
*
* @var string
*/
protected $description = 'Prune stale entries from the failed jobs table';
/**
* Execute the console command.
*
* @return int|null
| {
"filepath": "src/Illuminate/Queue/Console/PruneFailedJobsCommand.php",
"language": "php",
"file_size": 1235,
"cut_index": 518,
"middle_length": 229
} |
ate\Support\Arr;
use Illuminate\Support\Collection;
use RuntimeException;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'queue:retry')]
class RetryCommand extends Command
{
/**
* The console command signature.
*
* @var string
*/
protected $signature = 'queue:retry
... | /**
* Execute the console command.
*
* @return void
*/
public function handle()
{
$jobsFound = count($ids = $this->getJobIds()) > 0;
if ($jobsFound) {
$this->components->info('Pushing failed queue jo | {--range=* : Range of job IDs (numeric) to be retried (e.g. 1-5)}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Retry a failed queue job';
| {
"filepath": "src/Illuminate/Queue/Console/RetryCommand.php",
"language": "php",
"file_size": 6533,
"cut_index": 716,
"middle_length": 229
} |
pecified key that the rate limiter should use.
*
* @var string
*/
protected $key;
/**
* Indicates whether the throttle key should use the job's UUID.
*
* @var bool
*/
protected $byJob = false;
/**
* The maximum number of attempts allowed before rate limiting app... | determines if the exception should be reported.
*
* @var callable
*/
protected $reportCallback;
/**
* The callback that determines if rate limiting should apply.
*
* @var callable
*/
protected $whenCallback; | Seconds;
/**
* The number of minutes to wait before retrying the job after an exception.
*
* @var int|(\Closure(\Throwable): int)
*/
protected $retryAfterMinutes = 0;
/**
* The callback that | {
"filepath": "src/Illuminate/Queue/Middleware/ThrottlesExceptions.php",
"language": "php",
"file_size": 7995,
"cut_index": 716,
"middle_length": 229
} |
hp
namespace Illuminate\Queue\Connectors;
use Illuminate\Database\ConnectionResolverInterface;
use Illuminate\Queue\DatabaseQueue;
class DatabaseConnector implements ConnectorInterface
{
/**
* Database connections.
*
* @var \Illuminate\Database\ConnectionResolverInterface
*/
protected $co... |
public function connect(array $config)
{
return new DatabaseQueue(
$this->connections->connection($config['connection'] ?? null),
$config['table'],
$config['queue'],
$config['retry_after'] ?? | ionResolverInterface $connections)
{
$this->connections = $connections;
}
/**
* Establish a queue connection.
*
* @param array $config
* @return \Illuminate\Contracts\Queue\Queue
*/ | {
"filepath": "src/Illuminate/Queue/Connectors/DatabaseConnector.php",
"language": "php",
"file_size": 1068,
"cut_index": 515,
"middle_length": 229
} |
nate\Container\Container;
use Illuminate\Contracts\Queue\Job as JobContract;
use Illuminate\Queue\DatabaseQueue;
class DatabaseJob extends Job implements JobContract
{
/**
* The database queue instance.
*
* @var \Illuminate\Queue\DatabaseQueue
*/
protected $database;
/**
* The dat... | ic function __construct(Container $container, DatabaseQueue $database, $job, $connectionName, $queue)
{
$this->job = $job;
$this->queue = $queue;
$this->database = $database;
$this->container = $container;
$this- | r\Container $container
* @param \Illuminate\Queue\DatabaseQueue $database
* @param \Illuminate\Queue\Jobs\DatabaseJobRecord $job
* @param string $connectionName
* @param string $queue
*/
publ | {
"filepath": "src/Illuminate/Queue/Jobs/DatabaseJob.php",
"language": "php",
"file_size": 2307,
"cut_index": 563,
"middle_length": 229
} |
ner;
use Illuminate\Queue\ListenerOptions;
use Illuminate\Support\Stringable;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'queue:listen')]
class ListenCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $signature = 'queue:listen
... | ker to run even in maintenance mode}
{--memory=128 : The memory limit in megabytes}
{--queue= : The queue to listen on}
{--sleep=3 : The number of seconds to sleep when no | econds to delay failed jobs (Deprecated)}
{--backoff=0 : The number of seconds to wait before retrying a job that encountered an uncaught exception}
{--force : Force the wor | {
"filepath": "src/Illuminate/Queue/Console/ListenCommand.php",
"language": "php",
"file_size": 4162,
"cut_index": 614,
"middle_length": 229
} |
namespace Illuminate\Queue\Console;
use Illuminate\Console\Command;
use Illuminate\Contracts\Queue\Factory as QueueManager;
use Illuminate\Queue\Console\Concerns\ParsesQueue;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'queue:resume', aliases: ['queue:continue'])]
class ResumeCommand extends... | g
*/
protected $description = 'Resume job processing for a paused queue';
/**
* Execute the console command.
*
* @return int
*/
public function handle(QueueManager $manager)
{
[$connection, $queue] = $this- | resume processing}';
/**
* The console command name aliases.
*
* @var list<string>
*/
protected $aliases = ['queue:continue'];
/**
* The console command description.
*
* @var strin | {
"filepath": "src/Illuminate/Queue/Console/ResumeCommand.php",
"language": "php",
"file_size": 1221,
"cut_index": 518,
"middle_length": 229
} |
te\Queue\Middleware;
use Closure;
use Throwable;
class FailOnException
{
/**
* The truth-test callback to determine if the job should fail.
*
* @var \Closure(\Throwable, mixed): bool
*/
protected Closure $callback;
/**
* Create a middleware instance.
*
* @param (\Closu... | ss-string<\Throwable>> $exceptions
* @return \Closure(\Throwable, mixed): bool
*/
protected function failForExceptions(array $exceptions)
{
return static function (Throwable $throwable) use ($exceptions) {
foreach ($e | back = $this->failForExceptions($callback);
}
$this->callback = $callback;
}
/**
* Indicate that the job should fail if it encounters the given exceptions.
*
* @param array<array-key, cla | {
"filepath": "src/Illuminate/Queue/Middleware/FailOnException.php",
"language": "php",
"file_size": 1732,
"cut_index": 537,
"middle_length": 229
} |
pace Illuminate\Queue\Console;
use Illuminate\Console\Command;
use Illuminate\Contracts\Cache\Repository as Cache;
use Illuminate\Support\InteractsWithTime;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'queue:restart')]
class RestartCommand extends Command
{
use InteractsWithTime;
/**... | * Create a new queue restart command.
*
* @param \Illuminate\Contracts\Cache\Repository $cache
*/
public function __construct(Cache $cache)
{
parent::__construct();
$this->cache = $cache;
}
/**
* | protected $description = 'Restart queue worker daemons after their current job';
/**
* The cache store implementation.
*
* @var \Illuminate\Contracts\Cache\Repository
*/
protected $cache;
/**
| {
"filepath": "src/Illuminate/Queue/Console/RestartCommand.php",
"language": "php",
"file_size": 1269,
"cut_index": 524,
"middle_length": 229
} |
namespace Illuminate\Auth;
use Illuminate\Auth\Notifications\VerifyEmail;
trait MustVerifyEmail
{
/**
* Determine if the user has verified their email address.
*
* @return bool
*/
public function hasVerifiedEmail()
{
return ! is_null($this->email_verified_at);
}
/**
... | 'email_verified_at' => null,
])->save();
}
/**
* Send the email verification notification.
*
* @return void
*/
public function sendEmailVerificationNotification()
{
$this->notify(new VerifyEmail); | $this->freshTimestamp(),
])->save();
}
/**
* Mark the user's email as unverified.
*
* @return bool
*/
public function markEmailAsUnverified()
{
return $this->forceFill([
| {
"filepath": "src/Illuminate/Auth/MustVerifyEmail.php",
"language": "php",
"file_size": 1212,
"cut_index": 518,
"middle_length": 229
} |
te\Auth;
class Recaller
{
/**
* The "recaller" / "remember me" cookie string.
*
* @var string
*/
protected $recaller;
/**
* Create a new recaller instance.
*
* @param string $recaller
*/
public function __construct($recaller)
{
$this->recaller = @u... | recaller, 3)[1];
}
/**
* Get the password from the recaller.
*
* @return string
*/
public function hash()
{
return explode('|', $this->recaller, 4)[2];
}
/**
* Determine if the recaller is valid.
| return explode('|', $this->recaller, 3)[0];
}
/**
* Get the "remember token" token from the recaller.
*
* @return string
*/
public function token()
{
return explode('|', $this-> | {
"filepath": "src/Illuminate/Auth/Recaller.php",
"language": "php",
"file_size": 1858,
"cut_index": 537,
"middle_length": 229
} |
ontracts\Auth\Guard;
use Illuminate\Contracts\Auth\UserProvider;
use Illuminate\Http\Request;
use Illuminate\Support\Traits\Macroable;
class RequestGuard implements Guard
{
use GuardHelpers, Macroable;
/**
* The guard callback.
*
* @var callable
*/
protected $callback;
/**
* ... |
{
$this->request = $request;
$this->callback = $callback;
$this->provider = $provider;
}
/**
* Get the currently authenticated user.
*
* @return \Illuminate\Contracts\Auth\Authenticatable|null
*/
| * @param \Illuminate\Http\Request $request
* @param \Illuminate\Contracts\Auth\UserProvider|null $provider
*/
public function __construct(callable $callback, Request $request, ?UserProvider $provider = null) | {
"filepath": "src/Illuminate/Auth/RequestGuard.php",
"language": "php",
"file_size": 2126,
"cut_index": 563,
"middle_length": 229
} |
\Support\Timebox;
use Illuminate\Support\Traits\Macroable;
use InvalidArgumentException;
use RuntimeException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
class SessionGuard implements StatefulGuard, SupportsBasicAuth
{
use GuardHelpers, Macro... | recaller cookie.
*
* @var bool
*/
protected $viaRemember = false;
/**
* The number of minutes that the "remember me" cookie should be valid for.
*
* @var int
*/
protected $rememberDuration = 576000;
/**
| ing $name;
/**
* The user we last attempted to retrieve.
*
* @var \Illuminate\Contracts\Auth\Authenticatable
*/
protected $lastAttempted;
/**
* Indicates if the user was authenticated via a | {
"filepath": "src/Illuminate/Auth/SessionGuard.php",
"language": "php",
"file_size": 29384,
"cut_index": 1331,
"middle_length": 229
} |
UserProvider;
use Illuminate\Http\Request;
use Illuminate\Support\Traits\Macroable;
class TokenGuard implements Guard
{
use GuardHelpers, Macroable;
/**
* The request instance.
*
* @var \Illuminate\Http\Request
*/
protected $request;
/**
* The name of the query string item fr... | @param \Illuminate\Contracts\Auth\UserProvider $provider
* @param \Illuminate\Http\Request $request
* @param string $inputKey
* @param string $storageKey
* @param bool $hash
*/
public function __construct(
Us | ing
*/
protected $storageKey;
/**
* Indicates if the API token is hashed in storage.
*
* @var bool
*/
protected $hash = false;
/**
* Create a new authentication guard.
*
* | {
"filepath": "src/Illuminate/Auth/TokenGuard.php",
"language": "php",
"file_size": 3265,
"cut_index": 614,
"middle_length": 229
} |
\Auth\CanResetPassword as CanResetPasswordContract;
use Illuminate\Contracts\Hashing\Hasher as HasherContract;
use Illuminate\Support\Carbon;
use Illuminate\Support\Str;
class CacheTokenRepository implements TokenRepositoryInterface
{
/**
* The format of the stored Carbon object.
*/
protected string ... | assword $user
* @return string
*/
public function create(CanResetPasswordContract $user)
{
$this->delete($user);
$token = hash_hmac('sha256', Str::random(40), $this->hashKey);
$this->cache->put(
$thi | $hasher,
protected string $hashKey,
protected int $expires = 3600,
protected int $throttle = 60,
) {
}
/**
* Create a new token.
*
* @param \Illuminate\Contracts\Auth\CanResetP | {
"filepath": "src/Illuminate/Auth/Passwords/CacheTokenRepository.php",
"language": "php",
"file_size": 3571,
"cut_index": 614,
"middle_length": 229
} |
ConnectionInterface;
use Illuminate\Support\Carbon;
use Illuminate\Support\Str;
class DatabaseTokenRepository implements TokenRepositoryInterface
{
/**
* Create a new token repository instance.
*
* @param int $expires The number of seconds a token should remain valid.
* @param int $throttl... | *
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @return string
*/
public function create(CanResetPasswordContract $user)
{
$email = $user->getEmailForPasswordReset();
$this->deleteExisting($user | ed HasherContract $hasher,
protected string $table,
protected string $hashKey,
protected int $expires = 3600,
protected int $throttle = 60,
) {
}
/**
* Create a new token record.
| {
"filepath": "src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php",
"language": "php",
"file_size": 5320,
"cut_index": 716,
"middle_length": 229
} |
acts\Auth\PasswordBroker as PasswordBrokerContract;
use Illuminate\Contracts\Auth\UserProvider;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Support\Arr;
use Illuminate\Support\Timebox;
use UnexpectedValueException;
class PasswordBroker implements PasswordBrokerContract
{
/**
* The password toke... | box instance.
*
* @var \Illuminate\Support\Timebox
*/
protected $timebox;
/**
* The number of microseconds that the timebox should wait for.
*
* @var int
*/
protected $timeboxDuration;
/**
* Create | nate\Contracts\Auth\UserProvider
*/
protected $users;
/**
* The event dispatcher instance.
*
* @var \Illuminate\Contracts\Events\Dispatcher|null
*/
protected $events;
/**
* The time | {
"filepath": "src/Illuminate/Auth/Passwords/PasswordBroker.php",
"language": "php",
"file_size": 7352,
"cut_index": 716,
"middle_length": 229
} |
ctoryContract;
use InvalidArgumentException;
use function Illuminate\Support\enum_value;
/**
* @mixin \Illuminate\Contracts\Auth\PasswordBroker
*/
class PasswordBrokerManager implements FactoryContract
{
/**
* The application instance.
*
* @var \Illuminate\Contracts\Foundation\Application
*/... |
* @param \UnitEnum|string|null $name
* @return \Illuminate\Contracts\Auth\PasswordBroker
*/
public function broker($name = null)
{
$name = enum_value($name) ?: $this->getDefaultDriver();
return $this->brokers[$nam |
*
* @param \Illuminate\Contracts\Foundation\Application $app
*/
public function __construct($app)
{
$this->app = $app;
}
/**
* Attempt to get the broker from the local cache.
* | {
"filepath": "src/Illuminate/Auth/Passwords/PasswordBrokerManager.php",
"language": "php",
"file_size": 4220,
"cut_index": 614,
"middle_length": 229
} |
<?php
namespace Illuminate\Auth\Passwords;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;
class PasswordResetServiceProvider extends ServiceProvider implements DeferrableProvider
{
/**
* Register the service provider.
*
* @return void
*/
publi... | return $app->make('auth.password')->broker();
});
}
/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
return ['auth.password', 'auth.password.broke | sterPasswordBroker()
{
$this->app->singleton('auth.password', function ($app) {
return new PasswordBrokerManager($app);
});
$this->app->bind('auth.password.broker', function ($app) {
| {
"filepath": "src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php",
"language": "php",
"file_size": 1010,
"cut_index": 512,
"middle_length": 229
} |
namespace Illuminate\Auth\Passwords;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
interface TokenRepositoryInterface
{
/**
* Create a new token.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @return string
*/
public function create(Ca... | am \Illuminate\Contracts\Auth\CanResetPassword $user
* @return bool
*/
public function recentlyCreatedToken(CanResetPasswordContract $user);
/**
* Delete a token record.
*
* @param \Illuminate\Contracts\Auth\CanResetPas | $token
* @return bool
*/
public function exists(CanResetPasswordContract $user, #[\SensitiveParameter] $token);
/**
* Determine if the given user recently created a password reset token.
*
* @par | {
"filepath": "src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php",
"language": "php",
"file_size": 1217,
"cut_index": 518,
"middle_length": 229
} |
Illuminate\Auth\Console;
use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'auth:clear-resets')]
class ClearResetsCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'aut... | e command.
*
* @return void
*/
public function handle()
{
$this->laravel['auth.password']->broker($this->argument('name'))->getRepository()->deleteExpired();
$this->components->info('Expired reset tokens cleared succ | rd reset tokens';
/**
* Execute the consol | {
"filepath": "src/Illuminate/Auth/Console/ClearResetsCommand.php",
"language": "php",
"file_size": 858,
"cut_index": 529,
"middle_length": 52
} |
tion;
use Throwable;
class AuthorizationException extends Exception
{
/**
* The authorization response returned by the gate.
*
* @var \Illuminate\Auth\Access\Response
*/
protected $response;
/**
* The HTTP response status code.
*
* @var int|null
*/
protected $st... | /**
* Get the response from the gate.
*
* @return \Illuminate\Auth\Access\Response
*/
public function response()
{
return $this->response;
}
/**
* Set the response from the gate.
*
* @param \Ill | public function __construct($message = null, $code = null, ?Throwable $previous = null)
{
parent::__construct($message ?? 'This action is unauthorized.', 0, $previous);
$this->code = $code ?: 0;
}
| {
"filepath": "src/Illuminate/Auth/Access/AuthorizationException.php",
"language": "php",
"file_size": 2236,
"cut_index": 563,
"middle_length": 229
} |
Illuminate\Queue\Events;
class JobQueued
{
/**
* Create a new event instance.
*
* @param string $connectionName The connection name.
* @param string|null $queue The queue name.
* @param string|int|null $id The job ID.
* @param \Closure|string|object $job The job instance.
... | public $job,
public $payload,
public $delay,
) {
}
/**
* Get the decoded job payload.
*
* @return array
*/
public function payload()
{
return json_decode($this->payload, true, flags: JSON_ | me,
public $queue,
public $id,
| {
"filepath": "src/Illuminate/Queue/Events/JobQueued.php",
"language": "php",
"file_size": 862,
"cut_index": 529,
"middle_length": 52
} |
namespace Illuminate\Queue\Events;
class JobQueueing
{
/**
* Create a new event instance.
*
* @param string $connectionName The connection name.
* @param string|null $queue The queue name.
* @param \Closure|string|object $job The job instance.
* @param string $payload Th... | ,
public $payload,
public $delay,
) {
}
/**
* Get the decoded job payload.
*
* @return array
*/
public function payload()
{
return json_decode($this->payload, true, flags: JSON_THROW_ON_ERROR | public $job | {
"filepath": "src/Illuminate/Queue/Events/JobQueueing.php",
"language": "php",
"file_size": 798,
"cut_index": 517,
"middle_length": 14
} |
solverInterface;
use Illuminate\Support\Facades\Date;
class DatabaseUuidFailedJobProvider implements CountableFailedJobProvider, FailedJobProviderInterface, PrunableFailedJobProvider
{
/**
* The connection resolver implementation.
*
* @var \Illuminate\Database\ConnectionResolverInterface
*/
... | e
*/
public function __construct(ConnectionResolverInterface $resolver, $database, $table)
{
$this->table = $table;
$this->resolver = $resolver;
$this->database = $database;
}
/**
* Log a failed job into s | */
protected $table;
/**
* Create a new database failed job provider.
*
* @param \Illuminate\Database\ConnectionResolverInterface $resolver
* @param string $database
* @param string $tabl | {
"filepath": "src/Illuminate/Queue/Failed/DatabaseUuidFailedJobProvider.php",
"language": "php",
"file_size": 4532,
"cut_index": 614,
"middle_length": 229
} |
edJobProvider, FailedJobProviderInterface, PrunableFailedJobProvider
{
/**
* The file path where the failed job file should be stored.
*
* @var string
*/
protected $path;
/**
* The maximum number of failed jobs to retain.
*
* @var int
*/
protected $limit;
/*... | $this->limit = $limit;
$this->lockProviderResolver = $lockProviderResolver;
}
/**
* Log a failed job into storage.
*
* @param string $connection
* @param string $queue
* @param string $payload
* @param | g $path
* @param int $limit
* @param \Closure|null $lockProviderResolver
*/
public function __construct($path, $limit = 100, ?Closure $lockProviderResolver = null)
{
$this->path = $path;
| {
"filepath": "src/Illuminate/Queue/Failed/FileFailedJobProvider.php",
"language": "php",
"file_size": 5848,
"cut_index": 716,
"middle_length": 229
} |
on;
use RuntimeException;
use function Illuminate\Support\enum_value;
/**
* @mixin \Illuminate\Contracts\Auth\Guard
* @mixin \Illuminate\Contracts\Auth\StatefulGuard
*/
class AuthManager implements FactoryContract
{
use CreatesUserProviders, RebindsCallbacksToSelf;
/**
* The application instance.
... | user for Gate, Request, and the Authenticatable contract.
*
* @var \Closure
*/
protected $userResolver;
/**
* Create a new Auth manager instance.
*
* @param \Illuminate\Contracts\Foundation\Application $app
*/
| customCreators = [];
/**
* The array of created "drivers".
*
* @var array
*/
protected $guards = [];
/**
* The user resolver shared by various services.
*
* Determines the default | {
"filepath": "src/Illuminate/Auth/AuthManager.php",
"language": "php",
"file_size": 9002,
"cut_index": 716,
"middle_length": 229
} |
uirePassword;
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Routing\ResponseFactory;
use Illuminate\Contracts\Routing\UrlGenerator;
use Illuminate\Support\ServiceProvider;
class AuthServiceProvider extends S... | uthenticator services.
*
* @return void
*/
protected function registerAuthenticator()
{
$this->app->singleton('auth', fn ($app) => new AuthManager($app));
$this->app->singleton('auth.driver', fn ($app) => $app['auth' | gisterUserResolver();
$this->registerAccessGate();
$this->registerRequirePassword();
$this->registerRequestRebindHandler();
$this->registerEventRebindHandler();
}
/**
* Register the a | {
"filepath": "src/Illuminate/Auth/AuthServiceProvider.php",
"language": "php",
"file_size": 3110,
"cut_index": 614,
"middle_length": 229
} |
entException;
trait CreatesUserProviders
{
/**
* The registered custom provider creators.
*
* @var array
*/
protected $customProviderCreators = [];
/**
* Create the user provider implementation for the driver.
*
* @param string|null $provider
* @return \Illuminate... | derCreators[$driver], $this->app, $config
);
}
return match ($driver) {
'database' => $this->createDatabaseProvider($config),
'eloquent' => $this->createEloquentProvider($config),
default => | tProviderConfiguration($provider))) {
return;
}
if (isset($this->customProviderCreators[$driver = ($config['driver'] ?? null)])) {
return call_user_func(
$this->customProvi | {
"filepath": "src/Illuminate/Auth/CreatesUserProviders.php",
"language": "php",
"file_size": 2485,
"cut_index": 563,
"middle_length": 229
} |
Contract;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Database\ConnectionInterface;
class DatabaseUserProvider implements UserProvider
{
/**
* The active database connection.
*
* @var \Illuminate\Database\ConnectionInterface
*/
protected $connection;
/**
* The hashe... | $table
*/
public function __construct(ConnectionInterface $connection, HasherContract $hasher, $table)
{
$this->connection = $connection;
$this->table = $table;
$this->hasher = $hasher;
}
/**
* Retrieve a | rotected $table;
/**
* Create a new database user provider.
*
* @param \Illuminate\Database\ConnectionInterface $connection
* @param \Illuminate\Contracts\Hashing\Hasher $hasher
* @param string | {
"filepath": "src/Illuminate/Auth/DatabaseUserProvider.php",
"language": "php",
"file_size": 5628,
"cut_index": 716,
"middle_length": 229
} |
ontracts\Auth\Authenticatable as UserContract;
class GenericUser implements UserContract
{
/**
* All of the user's attributes.
*
* @var array
*/
protected $attributes;
/**
* Create a new generic User object.
*
* @param array $attributes
*/
public function __co... | >attributes[$this->getAuthIdentifierName()];
}
/**
* Get the name of the password attribute for the user.
*
* @return string
*/
public function getAuthPasswordName()
{
return 'password';
}
/**
* Ge | lic function getAuthIdentifierName()
{
return 'id';
}
/**
* Get the unique identifier for the user.
*
* @return mixed
*/
public function getAuthIdentifier()
{
return $this- | {
"filepath": "src/Illuminate/Auth/GenericUser.php",
"language": "php",
"file_size": 2739,
"cut_index": 563,
"middle_length": 229
} |
Illuminate\Container\Container;
use Illuminate\Contracts\Redis\Factory as Redis;
use Illuminate\Redis\Limiters\DurationLimiter;
use Illuminate\Support\InteractsWithTime;
class RateLimitedWithRedis extends RateLimited
{
use InteractsWithTime;
/**
* The name of the Redis connection that should be used.
... | ruct($limiterName);
$this->connectionName = $connection;
}
/**
* Handle a rate limited job.
*
* @param mixed $job
* @param callable $next
* @param array $limits
* @return mixed
*/
protected fun | decaysAt = [];
/**
* Create a new middleware instance.
*
* @param \UnitEnum|string $limiterName
*/
public function __construct($limiterName, ?string $connection = null)
{
parent::__const | {
"filepath": "src/Illuminate/Queue/Middleware/RateLimitedWithRedis.php",
"language": "php",
"file_size": 3034,
"cut_index": 563,
"middle_length": 229
} |
Aws\Credentials\CredentialProvider;
use Aws\Sqs\SqsClient;
use Illuminate\Queue\SqsQueue;
use Illuminate\Support\Arr;
use InvalidArgumentException;
class SqsConnector implements ConnectorInterface
{
/**
* Establish a queue connection.
*
* @param array $config
* @return \Illuminate\Contracts\Q... | empty($config['token'])) {
$config['credentials']['token'] = $config['token'];
}
}
return new SqsQueue(
new SqsClient(
Arr::except($config, ['token', 'overflow'])
),
| fig)) {
$config['credentials'] = $credentials;
} elseif (! empty($config['key']) && ! empty($config['secret'])) {
$config['credentials'] = Arr::only($config, ['key', 'secret']);
if (! | {
"filepath": "src/Illuminate/Queue/Connectors/SqsConnector.php",
"language": "php",
"file_size": 2615,
"cut_index": 563,
"middle_length": 229
} |
hp
namespace Illuminate\Queue\Jobs;
use Illuminate\Support\InteractsWithTime;
class DatabaseJobRecord
{
use InteractsWithTime;
/**
* The underlying job record.
*
* @var \stdClass
*/
protected $record;
/**
* Create a new job record instance.
*
* @param \stdClass ... | */
public function touch()
{
$this->record->reserved_at = $this->currentTime();
return $this->record->reserved_at;
}
/**
* Dynamically access the underlying job information.
*
* @param string $key
| eturn int
*/
public function increment()
{
$this->record->attempts++;
return $this->record->attempts;
}
/**
* Update the "reserved at" timestamp of the job.
*
* @return int
| {
"filepath": "src/Illuminate/Queue/Jobs/DatabaseJobRecord.php",
"language": "php",
"file_size": 1108,
"cut_index": 515,
"middle_length": 229
} |
pace Illuminate\Queue\Jobs;
use Illuminate\Support\Carbon;
class InspectedJob
{
/**
* Create a new inspected job instance.
*
* @param string|null $uuid The unique identifier for the job.
* @param string|null $name The display name of the job.
* @param int $attempts The number of ... | * @param string $payload The raw JSON job payload.
* @param int|null $attempts The number of times the job has been attempted.
* @return static
*/
public static function fromPayload(string $payload, ?int $attempts = null): static | donly ?string $uuid,
public readonly ?string $name,
public readonly int $attempts,
public readonly ?Carbon $createdAt,
) {
}
/**
* Create a new instance from a raw job payload.
*
| {
"filepath": "src/Illuminate/Queue/Jobs/InspectedJob.php",
"language": "php",
"file_size": 1381,
"cut_index": 524,
"middle_length": 229
} |
\Queue\ManuallyFailedException;
use Illuminate\Queue\TimeoutExceededException;
use Illuminate\Support\InteractsWithTime;
use Throwable;
abstract class Job
{
use InteractsWithTime;
/**
* The job handler instance.
*
* @var mixed
*/
protected $instance;
/**
* The IoC container i... | otected $failed = false;
/**
* The name of the connection the job belongs to.
*
* @var string
*/
protected $connectionName;
/**
* The name of the queue the job belongs to.
*
* @var string
*/
protect | ed $deleted = false;
/**
* Indicates if the job has been released.
*
* @var bool
*/
protected $released = false;
/**
* Indicates if the job has failed.
*
* @var bool
*/
pr | {
"filepath": "src/Illuminate/Queue/Jobs/Job.php",
"language": "php",
"file_size": 9159,
"cut_index": 716,
"middle_length": 229
} |
e Illuminate\Contracts\Queue\Job as JobContract;
use Illuminate\Support\Arr;
class SqsJob extends Job implements JobContract
{
/**
* The Amazon SQS client instance.
*
* @var \Aws\Sqs\SqsClient
*/
protected $sqs;
/**
* The Amazon SQS job instance.
*
* @var array
*/
... | SqsClient $sqs
* @param array $job
* @param string $connectionName
* @param string $queue
* @param array $overflowStorage
*/
public function __construct(Container $container, SqsClient $sqs, array $job, $connectionName | aw body of the job.
*
* @var string|null
*/
protected $cachedRawBody = null;
/**
* Create a new job instance.
*
* @param \Illuminate\Container\Container $container
* @param \Aws\Sqs\ | {
"filepath": "src/Illuminate/Queue/Jobs/SqsJob.php",
"language": "php",
"file_size": 4334,
"cut_index": 614,
"middle_length": 229
} |
ueueManager;
use Illuminate\Queue\QueueServiceProvider;
use Illuminate\Support\Traits\CapsuleManagerTrait;
/**
* @mixin \Illuminate\Queue\QueueManager
* @mixin \Illuminate\Contracts\Queue\Queue
*/
class Manager
{
use CapsuleManagerTrait;
/**
* The queue manager instance.
*
* @var \Illuminate... | he container "config" bindings. This'll just make the queue
// manager behave correctly since all the correct bindings are in place.
$this->setupDefaultConfiguration();
$this->setupManager();
$this->registerConnectors();
| c function __construct(?Container $container = null)
{
$this->setupContainer($container ?: new Container);
// Once we have the container setup, we will set up the default configuration
// options in t | {
"filepath": "src/Illuminate/Queue/Capsule/Manager.php",
"language": "php",
"file_size": 4765,
"cut_index": 614,
"middle_length": 229
} |
acades\Date;
class DynamoDbFailedJobProvider implements FailedJobProviderInterface
{
/**
* The DynamoDB client instance.
*
* @var \Aws\DynamoDb\DynamoDbClient
*/
protected $dynamo;
/**
* The application name.
*
* @var string
*/
protected $applicationName;
/... | $dynamo;
$this->applicationName = $applicationName;
}
/**
* Log a failed job into storage.
*
* @param string $connection
* @param string $queue
* @param string $payload
* @param \Throwable $exception
| $dynamo
* @param string $applicationName
* @param string $table
*/
public function __construct(DynamoDbClient $dynamo, $applicationName, $table)
{
$this->table = $table;
$this->dynamo = | {
"filepath": "src/Illuminate/Queue/Failed/DynamoDbFailedJobProvider.php",
"language": "php",
"file_size": 5397,
"cut_index": 716,
"middle_length": 229
} |
te\Queue\Failed;
class NullFailedJobProvider implements CountableFailedJobProvider, FailedJobProviderInterface
{
/**
* Log a failed job into storage.
*
* @param string $connection
* @param string $queue
* @param string $payload
* @param \Throwable $exception
* @return int... |
return [];
}
/**
* Get a single failed job.
*
* @param mixed $id
* @return object|null
*/
public function find($id)
{
//
}
/**
* Delete a single failed job from storage.
*
| $queue
* @return array
*/
public function ids($queue = null)
{
return [];
}
/**
* Get a list of all of the failed jobs.
*
* @return array
*/
public function all()
{ | {
"filepath": "src/Illuminate/Queue/Failed/NullFailedJobProvider.php",
"language": "php",
"file_size": 1568,
"cut_index": 537,
"middle_length": 229
} |
te\Auth;
use Exception;
use Illuminate\Http\Request;
class AuthenticationException extends Exception
{
/**
* All of the guards that were checked.
*
* @var array
*/
protected $guards;
/**
* The path the user should be redirected to.
*
* @var string|null
*/
prote... | d.', array $guards = [], $redirectTo = null)
{
parent::__construct($message);
$this->guards = $guards;
$this->redirectTo = $redirectTo;
}
/**
* Get the guards that were checked.
*
* @return array
*/ | /**
* Create a new authentication exception.
*
* @param string $message
* @param array $guards
* @param string|null $redirectTo
*/
public function __construct($message = 'Unauthenticate | {
"filepath": "src/Illuminate/Auth/AuthenticationException.php",
"language": "php",
"file_size": 1831,
"cut_index": 537,
"middle_length": 229
} |
ontracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\UserProvider;
/**
* These methods are typically the same across all guards.
*/
trait GuardHelpers
{
/**
* The currently authenticated user.
*
* @var \Illuminate\Contracts\Auth\Authenticatable|null
*/
p... | {
return $this->user() ?? throw new AuthenticationException;
}
/**
* Determine if the guard has a user instance.
*
* @return bool
*/
public function hasUser()
{
return ! is_null($this->user);
}
| urrent user is authenticated. If not, throw an exception.
*
* @return \Illuminate\Contracts\Auth\Authenticatable
*
* @throws \Illuminate\Auth\AuthenticationException
*/
public function authenticate()
| {
"filepath": "src/Illuminate/Auth/GuardHelpers.php",
"language": "php",
"file_size": 2498,
"cut_index": 563,
"middle_length": 229
} |
namespace Illuminate\Queue\Console;
use Illuminate\Console\Command;
use Illuminate\Contracts\Queue\Factory as QueueManager;
use Illuminate\Queue\Console\Concerns\ParsesQueue;
use Illuminate\Queue\Worker;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'queue:pause')]
class PauseCommand extends C... | */
public function handle(QueueManager $manager)
{
[$connection, $queue] = $this->parseQueue($this->argument('queue'));
if (! Worker::$pausable) {
$this->components->error('Queue pausing is currently disabled.');
| /**
* The console command description.
*
* @var string
*/
protected $description = 'Pause job processing for a specific queue';
/**
* Execute the console command.
*
* @return int
| {
"filepath": "src/Illuminate/Queue/Console/PauseCommand.php",
"language": "php",
"file_size": 1208,
"cut_index": 518,
"middle_length": 229
} |
hp
namespace Illuminate\Queue\Jobs;
use Illuminate\Support\Str;
class JobName
{
/**
* Parse the given job name into a class / method array.
*
* @param string $job
* @return array
*/
public static function parse($job)
{
return Str::parseCallback($job, 'fire');
}
... | m string $name
* @param array<string, mixed> $payload
* @return string
*/
public static function resolveClassName($name, $payload)
{
if (is_string($payload['data']['commandName'] ?? null)) {
return $payload['d | name, $payload)
{
if (! empty($payload['displayName'])) {
return $payload['displayName'];
}
return $name;
}
/**
* Get the class name for queued job class.
*
* @para | {
"filepath": "src/Illuminate/Queue/Jobs/JobName.php",
"language": "php",
"file_size": 1063,
"cut_index": 515,
"middle_length": 229
} |
te\Queue\Jobs;
use Illuminate\Container\Container;
use Illuminate\Contracts\Queue\Job as JobContract;
class SyncJob extends Job implements JobContract
{
/**
* The class name of the job.
*
* @var string
*/
protected $job;
/**
* The queue message data.
*
* @var string
... | ->container = $container;
$this->connectionName = $connectionName;
}
/**
* Release the job back into the queue after (n) seconds.
*
* @param int $delay
* @return void
*/
public function release($delay = 0)
| $connectionName
* @param string $queue
*/
public function __construct(Container $container, $payload, $connectionName, $queue)
{
$this->queue = $queue;
$this->payload = $payload;
$this | {
"filepath": "src/Illuminate/Queue/Jobs/SyncJob.php",
"language": "php",
"file_size": 1700,
"cut_index": 537,
"middle_length": 229
} |
hp
namespace Illuminate\Queue\Failed;
interface FailedJobProviderInterface
{
/**
* Log a failed job into storage.
*
* @param string $connection
* @param string $queue
* @param string $payload
* @param \Throwable $exception
* @return string|int|null
*/
public fun... | turn object|null
*/
public function find($id);
/**
* Delete a single failed job from storage.
*
* @param mixed $id
* @return bool
*/
public function forget($id);
/**
* Flush all of the failed jobs from | unction ids($queue = null);
/**
* Get a list of all of the failed jobs.
*
* @return array
*/
public function all();
/**
* Get a single failed job.
*
* @param mixed $id
* @re | {
"filepath": "src/Illuminate/Queue/Failed/FailedJobProviderInterface.php",
"language": "php",
"file_size": 1121,
"cut_index": 515,
"middle_length": 229
} |
Contract;
use Illuminate\Contracts\Support\Arrayable;
class EloquentUserProvider implements UserProvider
{
/**
* The hasher implementation.
*
* @var \Illuminate\Contracts\Hashing\Hasher
*/
protected $hasher;
/**
* The Eloquent user model.
*
* @var class-string<\Illuminat... | @param string $model
*/
public function __construct(HasherContract $hasher, $model)
{
$this->model = $model;
$this->hasher = $hasher;
}
/**
* Retrieve a user by their unique identifier.
*
* @param mi | (\Closure(\Illuminate\Database\Eloquent\Builder<*>):mixed)|null
*/
protected $queryCallback;
/**
* Create a new database user provider.
*
* @param \Illuminate\Contracts\Hashing\Hasher $hasher
* | {
"filepath": "src/Illuminate/Auth/EloquentUserProvider.php",
"language": "php",
"file_size": 7674,
"cut_index": 716,
"middle_length": 229
} |
te\Queue\Jobs;
use Illuminate\Contracts\Queue\Job as JobContract;
use Illuminate\Support\Str;
class FakeJob extends Job implements JobContract
{
/**
* The number of seconds the released job was delayed.
*
* @var int
*/
public $releaseDelay;
/**
* The number of attempts made to pr... | rn string
*/
public function getRawBody()
{
return '';
}
/**
* Release the job back into the queue after (n) seconds.
*
* @param \DateTimeInterface|\DateInterval|int $delay
* @return void
*/
publ | *
* Get the job identifier.
*
* @return string
*/
public function getJobId()
{
return once(fn () => (string) Str::uuid());
}
/**
* Get the raw body of the job.
*
* @retu | {
"filepath": "src/Illuminate/Queue/Jobs/FakeJob.php",
"language": "php",
"file_size": 1739,
"cut_index": 537,
"middle_length": 229
} |
nate\Container\Container;
use Illuminate\Contracts\Queue\Job as JobContract;
use Illuminate\Queue\RedisQueue;
class RedisJob extends Job implements JobContract
{
/**
* The Redis queue instance.
*
* @var \Illuminate\Queue\RedisQueue
*/
protected $redis;
/**
* The Redis raw job payl... | minate\Queue\RedisQueue $redis
* @param string $job
* @param string $reserved
* @param string $connectionName
* @param string $queue
*/
public function __construct(Container $container, RedisQueue $redis, $job, $reserv | s job payload inside the reserved queue.
*
* @var string
*/
protected $reserved;
/**
* Create a new job instance.
*
* @param \Illuminate\Container\Container $container
* @param \Illu | {
"filepath": "src/Illuminate/Queue/Jobs/RedisJob.php",
"language": "php",
"file_size": 3025,
"cut_index": 563,
"middle_length": 229
} |
table
{
/**
* The column name of the password field using during authentication.
*
* @var string
*/
protected $authPasswordName = 'password';
/**
* The column name of the "remember me" token.
*
* @var string
*/
protected $rememberTokenName = 'remember_token';
... | que broadcast identifier for the user.
*
* @return mixed
*/
public function getAuthIdentifierForBroadcasting()
{
return $this->getAuthIdentifier();
}
/**
* Get the name of the password attribute for the user.
| }
/**
* Get the unique identifier for the user.
*
* @return mixed
*/
public function getAuthIdentifier()
{
return $this->{$this->getAuthIdentifierName()};
}
/**
* Get the uni | {
"filepath": "src/Illuminate/Auth/Authenticatable.php",
"language": "php",
"file_size": 2171,
"cut_index": 563,
"middle_length": 229
} |
solverInterface;
use Illuminate\Support\Facades\Date;
class DatabaseFailedJobProvider implements CountableFailedJobProvider, FailedJobProviderInterface, PrunableFailedJobProvider
{
/**
* The connection resolver implementation.
*
* @var \Illuminate\Database\ConnectionResolverInterface
*/
pro... | */
public function __construct(ConnectionResolverInterface $resolver, $database, $table)
{
$this->table = $table;
$this->resolver = $resolver;
$this->database = $database;
}
/**
* Log a failed job into stora |
protected $table;
/**
* Create a new database failed job provider.
*
* @param \Illuminate\Database\ConnectionResolverInterface $resolver
* @param string $database
* @param string $table
| {
"filepath": "src/Illuminate/Queue/Failed/DatabaseFailedJobProvider.php",
"language": "php",
"file_size": 4185,
"cut_index": 614,
"middle_length": 229
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.