1 | <?php |
||
14 | class BeanstalkdAdapter extends Adapter |
||
15 | { |
||
16 | /** @var Pheanstalk */ |
||
17 | private $connection; |
||
18 | |||
19 | private $host; |
||
20 | private $port; |
||
21 | private $queue; |
||
22 | private $timeout; |
||
23 | private $persistent; |
||
24 | |||
25 | public function __construct( |
||
38 | |||
39 | /** |
||
40 | * Establish connection to the queue. |
||
41 | */ |
||
42 | public function connect(): void |
||
46 | |||
47 | /** |
||
48 | * Push command onto the queue. |
||
49 | * |
||
50 | * @param Channel $channel |
||
51 | * @param Driver $driver |
||
52 | * @param Command $command |
||
53 | */ |
||
54 | public function push(Channel $channel, Driver $driver, Command $command): void |
||
59 | |||
60 | /** |
||
61 | * Push command onto the queue with a delay. |
||
62 | * |
||
63 | * @param Channel $channel |
||
64 | * @param Driver $driver |
||
65 | * @param Command $command |
||
66 | * @param int $delay |
||
67 | * |
||
68 | * @return mixed|void |
||
69 | */ |
||
70 | public function later(Channel $channel, Driver $driver, Command $command, int $delay): void |
||
75 | } |
||
76 |