Queue.php 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace Illuminate\Support\Facades;
  3. use Illuminate\Support\Testing\Fakes\QueueFake;
  4. /**
  5. * @method static int size(string $queue = null)
  6. * @method static mixed push(string|object $job, string $data = '', $queue = null)
  7. * @method static mixed pushOn(string $queue, string|object $job, $data = '')
  8. * @method static mixed pushRaw(string $payload, string $queue = null, array $options = [])
  9. * @method static mixed later(\DateTimeInterface|\DateInterval|int $delay, string|object $job, $data = '', string $queue = null)
  10. * @method static mixed laterOn(string $queue, \DateTimeInterface|\DateInterval|int $delay, string|object $job, $data = '')
  11. * @method static mixed bulk(array $jobs, $data = '', string $queue = null)
  12. * @method static \Illuminate\Contracts\Queue\Job|null pop(string $queue = null)
  13. * @method static string getConnectionName()
  14. * @method static \Illuminate\Contracts\Queue\Queue setConnectionName(string $name)
  15. *
  16. * @see \Illuminate\Queue\QueueManager
  17. * @see \Illuminate\Queue\Queue
  18. */
  19. class Queue extends Facade
  20. {
  21. /**
  22. * Replace the bound instance with a fake.
  23. *
  24. * @return void
  25. */
  26. public static function fake()
  27. {
  28. static::swap(new QueueFake(static::getFacadeApplication()));
  29. }
  30. /**
  31. * Get the registered name of the component.
  32. *
  33. * @return string
  34. */
  35. protected static function getFacadeAccessor()
  36. {
  37. return 'queue';
  38. }
  39. }