1 | <?php |
||
14 | final class ArrayObjectQueue implements QueueInterface, \Countable |
||
15 | { |
||
16 | /** |
||
17 | * @var \ArrayObject |
||
18 | */ |
||
19 | private $storage; |
||
20 | |||
21 | /** |
||
22 | * ArrayObjectQueue constructor. |
||
23 | * @param \ArrayObject $storage |
||
24 | */ |
||
25 | 5 | public function __construct(\ArrayObject $storage) |
|
29 | |||
30 | /** |
||
31 | * @param MessageInterface $message |
||
32 | */ |
||
33 | 5 | public function store(MessageInterface $message): void |
|
37 | |||
38 | /** |
||
39 | * @return MessageInterface |
||
40 | * @throws EmptyQueueException |
||
41 | */ |
||
42 | 4 | public function fetch(): MessageInterface |
|
51 | |||
52 | /** |
||
53 | * @return int |
||
54 | */ |
||
55 | public function count(): int |
||
59 | } |