1 | <?php |
||
5 | class CatalogArray implements Catalog |
||
6 | { |
||
7 | /** @var Header */ |
||
8 | protected $headers; |
||
9 | |||
10 | /** @var array */ |
||
11 | protected $entries; |
||
12 | |||
13 | /** |
||
14 | * @param Entry[] $entries |
||
15 | */ |
||
16 | public function __construct(array $entries = array()) |
||
24 | |||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | public function addEntry(Entry $entry) |
||
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | public function addHeaders(Header $headers) |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | public function removeEntry($msgid, $msgctxt = null) |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function getHeaders() |
||
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | public function getHeader() |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | public function getEntries() |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | public function getEntry($msgId, $context = null) |
||
92 | |||
93 | /** |
||
94 | * @param string $msgId |
||
95 | * @param string|null $context |
||
96 | * |
||
97 | * @return string |
||
98 | */ |
||
99 | private function getEntryHash($msgId, $context = null) |
||
103 | } |
||
104 |