| 1 | <?php |
||
| 13 | class SyncAdapter extends Adapter |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * Establish connection to the queue. |
||
| 17 | */ |
||
| 18 | 1 | public function connect(): void |
|
| 21 | |||
| 22 | /** |
||
| 23 | * Pull next job from the queue. |
||
| 24 | * |
||
| 25 | * @return Job |
||
| 26 | */ |
||
| 27 | public function next(): ?Job |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Push command onto the queue. |
||
| 34 | * |
||
| 35 | * @param Channel $channel |
||
| 36 | * @param Driver $driver |
||
| 37 | * @param Command $command |
||
| 38 | */ |
||
| 39 | 2 | public function push(Channel $channel, Driver $driver, Command $command): void |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Push command onto the queue with a delay. |
||
| 46 | * |
||
| 47 | * @param Channel $channel |
||
| 48 | * @param Driver $driver |
||
| 49 | * @param Command $command |
||
| 50 | * @param int $delay |
||
| 51 | * |
||
| 52 | * @return mixed|void |
||
| 53 | */ |
||
| 54 | 1 | public function later(Channel $channel, Driver $driver, Command $command, int $delay): void |
|
| 62 | } |
||
| 63 |