1 | <?php |
||
10 | final class FilesystemQueue implements QueueInterface, \Countable |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $directory; |
||
16 | |||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | private $mode; |
||
21 | |||
22 | /** |
||
23 | * @param string $directory |
||
24 | * @param int $mode |
||
25 | */ |
||
26 | 4 | public function __construct(string $directory, int $mode = 0750) |
|
31 | |||
32 | /** |
||
33 | * @param MessageInterface $message |
||
34 | */ |
||
35 | 4 | public function store(MessageInterface $message): void |
|
47 | |||
48 | /** |
||
49 | * @return MessageInterface |
||
50 | * @throws EmptyQueueException |
||
51 | */ |
||
52 | 2 | public function fetch(): MessageInterface |
|
68 | |||
69 | /** |
||
70 | * @return int |
||
71 | */ |
||
72 | 1 | public function count(): int |
|
76 | } |
||
77 |