You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Queue.php 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 \Illuminate\Support\Testing\Fakes\QueueFake
  25. */
  26. public static function fake()
  27. {
  28. static::swap($fake = new QueueFake(static::getFacadeApplication()));
  29. return $fake;
  30. }
  31. /**
  32. * Get the registered name of the component.
  33. *
  34. * @return string
  35. */
  36. protected static function getFacadeAccessor()
  37. {
  38. return 'queue';
  39. }
  40. }