App.php
1 month ago
Artisan.php
1 month ago
Auth.php
1 month ago
Blade.php
1 month ago
Broadcast.php
1 month ago
Bus.php
1 month ago
Cache.php
1 month ago
Config.php
1 month ago
Cookie.php
1 month ago
Crypt.php
1 month ago
DB.php
1 month ago
Date.php
1 month ago
Event.php
1 month ago
Facade.php
1 month ago
File.php
1 month ago
Gate.php
1 month ago
Hash.php
1 month ago
Http.php
1 month ago
Lang.php
1 month ago
Log.php
1 month ago
Mail.php
1 month ago
Notification.php
1 month ago
ParallelTesting.php
1 month ago
Password.php
1 month ago
Queue.php
1 month ago
RateLimiter.php
1 month ago
Redirect.php
1 month ago
Redis.php
1 month ago
Request.php
1 month ago
Response.php
1 month ago
Route.php
1 month ago
Schema.php
1 month ago
Session.php
1 month ago
Storage.php
1 month ago
URL.php
1 month ago
Validator.php
1 month ago
View.php
1 month ago
Vite.php
1 month ago
Queue.php
89 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWPSCOPED\Illuminate\Support\Facades; |
| 4 | |
| 5 | use IAWPSCOPED\Illuminate\Queue\Worker; |
| 6 | use IAWPSCOPED\Illuminate\Support\Testing\Fakes\QueueFake; |
| 7 | /** |
| 8 | * @method static void before(mixed $callback) |
| 9 | * @method static void after(mixed $callback) |
| 10 | * @method static void exceptionOccurred(mixed $callback) |
| 11 | * @method static void looping(mixed $callback) |
| 12 | * @method static void failing(mixed $callback) |
| 13 | * @method static void stopping(mixed $callback) |
| 14 | * @method static bool connected(string|null $name = null) |
| 15 | * @method static \Illuminate\Contracts\Queue\Queue connection(string|null $name = null) |
| 16 | * @method static void extend(string $driver, \Closure $resolver) |
| 17 | * @method static void addConnector(string $driver, \Closure $resolver) |
| 18 | * @method static string getDefaultDriver() |
| 19 | * @method static void setDefaultDriver(string $name) |
| 20 | * @method static string getName(string|null $connection = null) |
| 21 | * @method static \Illuminate\Contracts\Foundation\Application getApplication() |
| 22 | * @method static \Illuminate\Queue\QueueManager setApplication(\Illuminate\Contracts\Foundation\Application $app) |
| 23 | * @method static int size(string|null $queue = null) |
| 24 | * @method static mixed push(string|object $job, mixed $data = '', string|null $queue = null) |
| 25 | * @method static mixed pushOn(string $queue, string|object $job, mixed $data = '') |
| 26 | * @method static mixed pushRaw(string $payload, string|null $queue = null, array $options = []) |
| 27 | * @method static mixed later(\DateTimeInterface|\DateInterval|int $delay, string|object $job, mixed $data = '', string|null $queue = null) |
| 28 | * @method static mixed laterOn(string $queue, \DateTimeInterface|\DateInterval|int $delay, string|object $job, mixed $data = '') |
| 29 | * @method static mixed bulk(array $jobs, mixed $data = '', string|null $queue = null) |
| 30 | * @method static \Illuminate\Contracts\Queue\Job|null pop(string|null $queue = null) |
| 31 | * @method static string getConnectionName() |
| 32 | * @method static \Illuminate\Contracts\Queue\Queue setConnectionName(string $name) |
| 33 | * @method static mixed getJobBackoff(mixed $job) |
| 34 | * @method static mixed getJobExpiration(mixed $job) |
| 35 | * @method static void createPayloadUsing(callable|null $callback) |
| 36 | * @method static \Illuminate\Container\Container getContainer() |
| 37 | * @method static void setContainer(\Illuminate\Container\Container $container) |
| 38 | * @method static \Illuminate\Support\Testing\Fakes\QueueFake except(array|string $jobsToBeQueued) |
| 39 | * @method static void assertPushed(string|\Closure $job, callable|int|null $callback = null) |
| 40 | * @method static void assertPushedOn(string $queue, string|\Closure $job, callable|null $callback = null) |
| 41 | * @method static void assertPushedWithChain(string $job, array $expectedChain = [], callable|null $callback = null) |
| 42 | * @method static void assertPushedWithoutChain(string $job, callable|null $callback = null) |
| 43 | * @method static void assertNotPushed(string|\Closure $job, callable|null $callback = null) |
| 44 | * @method static void assertNothingPushed() |
| 45 | * @method static \Illuminate\Support\Collection pushed(string $job, callable|null $callback = null) |
| 46 | * @method static bool hasPushed(string $job) |
| 47 | * @method static bool shouldFakeJob(object $job) |
| 48 | * @method static array pushedJobs() |
| 49 | * |
| 50 | * @see \Illuminate\Queue\QueueManager |
| 51 | * @see \Illuminate\Queue\Queue |
| 52 | * @see \Illuminate\Support\Testing\Fakes\QueueFake |
| 53 | * @internal |
| 54 | */ |
| 55 | class Queue extends Facade |
| 56 | { |
| 57 | /** |
| 58 | * Register a callback to be executed to pick jobs. |
| 59 | * |
| 60 | * @param string $workerName |
| 61 | * @param callable $callback |
| 62 | * @return void |
| 63 | */ |
| 64 | public static function popUsing($workerName, $callback) |
| 65 | { |
| 66 | return Worker::popUsing($workerName, $callback); |
| 67 | } |
| 68 | /** |
| 69 | * Replace the bound instance with a fake. |
| 70 | * |
| 71 | * @param array|string $jobsToFake |
| 72 | * @return \Illuminate\Support\Testing\Fakes\QueueFake |
| 73 | */ |
| 74 | public static function fake($jobsToFake = []) |
| 75 | { |
| 76 | static::swap($fake = new QueueFake(static::getFacadeApplication(), $jobsToFake, static::getFacadeRoot())); |
| 77 | return $fake; |
| 78 | } |
| 79 | /** |
| 80 | * Get the registered name of the component. |
| 81 | * |
| 82 | * @return string |
| 83 | */ |
| 84 | protected static function getFacadeAccessor() |
| 85 | { |
| 86 | return 'queue'; |
| 87 | } |
| 88 | } |
| 89 |