Bus.php 983B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Illuminate\Support\Facades;
  3. use Illuminate\Support\Testing\Fakes\BusFake;
  4. use Illuminate\Contracts\Bus\Dispatcher as BusDispatcherContract;
  5. /**
  6. * @method static mixed dispatch($command)
  7. * @method static mixed dispatchNow($command, $handler = null)
  8. * @method static bool hasCommandHandler($command)
  9. * @method static bool|mixed getCommandHandler($command)
  10. * @method static \Illuminate\Contracts\Bus\Dispatcher pipeThrough(array $pipes)
  11. * @method static \Illuminate\Contracts\Bus\Dispatcher map(array $map)
  12. *
  13. * @see \Illuminate\Contracts\Bus\Dispatcher
  14. */
  15. class Bus extends Facade
  16. {
  17. /**
  18. * Replace the bound instance with a fake.
  19. *
  20. * @return void
  21. */
  22. public static function fake()
  23. {
  24. static::swap(new BusFake);
  25. }
  26. /**
  27. * Get the registered name of the component.
  28. *
  29. * @return string
  30. */
  31. protected static function getFacadeAccessor()
  32. {
  33. return BusDispatcherContract::class;
  34. }
  35. }