App.php
2 years ago
Artisan.php
2 years ago
Auth.php
2 years ago
Blade.php
2 years ago
Broadcast.php
2 years ago
Bus.php
2 years ago
Cache.php
2 years ago
Config.php
2 years ago
Cookie.php
2 years ago
Crypt.php
2 years ago
DB.php
2 years ago
Date.php
2 years ago
Event.php
2 years ago
Facade.php
2 years ago
File.php
2 years ago
Gate.php
2 years ago
Hash.php
2 years ago
Http.php
2 years ago
Lang.php
2 years ago
Log.php
2 years ago
Mail.php
2 years ago
Notification.php
2 years ago
ParallelTesting.php
2 years ago
Password.php
2 years ago
Queue.php
2 years ago
RateLimiter.php
2 years ago
Redirect.php
2 years ago
Redis.php
2 years ago
Request.php
2 years ago
Response.php
2 years ago
Route.php
2 years ago
Schema.php
2 years ago
Session.php
2 years ago
Storage.php
2 years ago
URL.php
2 years ago
Validator.php
2 years ago
View.php
2 years ago
Bus.php
70 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP_SCOPED\Illuminate\Support\Facades; |
| 4 | |
| 5 | use IAWP_SCOPED\Illuminate\Contracts\Bus\Dispatcher as BusDispatcherContract; |
| 6 | use IAWP_SCOPED\Illuminate\Foundation\Bus\PendingChain; |
| 7 | use IAWP_SCOPED\Illuminate\Support\Testing\Fakes\BusFake; |
| 8 | /** |
| 9 | * @method static \Illuminate\Bus\Batch|null findBatch(string $batchId) |
| 10 | * @method static \Illuminate\Bus\PendingBatch batch(array|mixed $jobs) |
| 11 | * @method static \Illuminate\Contracts\Bus\Dispatcher map(array $map) |
| 12 | * @method static \Illuminate\Contracts\Bus\Dispatcher pipeThrough(array $pipes) |
| 13 | * @method static \Illuminate\Foundation\Bus\PendingChain chain(array $jobs) |
| 14 | * @method static bool hasCommandHandler($command) |
| 15 | * @method static bool|mixed getCommandHandler($command) |
| 16 | * @method static mixed dispatch($command) |
| 17 | * @method static mixed dispatchNow($command, $handler = null) |
| 18 | * @method static mixed dispatchSync($command, $handler = null) |
| 19 | * @method static void assertDispatched(string|\Closure $command, callable|int $callback = null) |
| 20 | * @method static void assertDispatchedTimes(string $command, int $times = 1) |
| 21 | * @method static void assertNotDispatched(string|\Closure $command, callable|int $callback = null) |
| 22 | * @method static void assertDispatchedAfterResponse(string|\Closure $command, callable|int $callback = null) |
| 23 | * @method static void assertDispatchedAfterResponseTimes(string $command, int $times = 1) |
| 24 | * @method static void assertNotDispatchedAfterResponse(string|\Closure $command, callable $callback = null) |
| 25 | * @method static void assertBatched(callable $callback) |
| 26 | * @method static void assertBatchCount(int $count) |
| 27 | * @method static void assertChained(array $expectedChain) |
| 28 | * @method static void assertDispatchedSync(string|\Closure $command, callable $callback = null) |
| 29 | * @method static void assertDispatchedSyncTimes(string $command, int $times = 1) |
| 30 | * @method static void assertNotDispatchedSync(string|\Closure $command, callable $callback = null) |
| 31 | * @method static void assertDispatchedWithoutChain(string|\Closure $command, callable $callback = null) |
| 32 | * |
| 33 | * @see \Illuminate\Contracts\Bus\Dispatcher |
| 34 | * @internal |
| 35 | */ |
| 36 | class Bus extends Facade |
| 37 | { |
| 38 | /** |
| 39 | * Replace the bound instance with a fake. |
| 40 | * |
| 41 | * @param array|string $jobsToFake |
| 42 | * @return \Illuminate\Support\Testing\Fakes\BusFake |
| 43 | */ |
| 44 | public static function fake($jobsToFake = []) |
| 45 | { |
| 46 | static::swap($fake = new BusFake(static::getFacadeRoot(), $jobsToFake)); |
| 47 | return $fake; |
| 48 | } |
| 49 | /** |
| 50 | * Dispatch the given chain of jobs. |
| 51 | * |
| 52 | * @param array|mixed $jobs |
| 53 | * @return \Illuminate\Foundation\Bus\PendingDispatch |
| 54 | */ |
| 55 | public static function dispatchChain($jobs) |
| 56 | { |
| 57 | $jobs = \is_array($jobs) ? $jobs : \func_get_args(); |
| 58 | return (new PendingChain(\array_shift($jobs), $jobs))->dispatch(); |
| 59 | } |
| 60 | /** |
| 61 | * Get the registered name of the component. |
| 62 | * |
| 63 | * @return string |
| 64 | */ |
| 65 | protected static function getFacadeAccessor() |
| 66 | { |
| 67 | return BusDispatcherContract::class; |
| 68 | } |
| 69 | } |
| 70 |