1 | <?php |
||
8 | class Catalog |
||
9 | { |
||
10 | /** @var Header */ |
||
11 | protected $headers; |
||
12 | |||
13 | /** @var array */ |
||
14 | protected $entries; |
||
15 | |||
16 | /** |
||
17 | * @param Entry[] $entries |
||
18 | */ |
||
19 | public function __construct(array $entries = array()) |
||
27 | |||
28 | public function addEntry(Entry $entry) |
||
36 | |||
37 | public function addHeaders(Header $headers) |
||
41 | |||
42 | /** |
||
43 | * @param string $msgid |
||
44 | * @param string|null $msgctxt |
||
45 | */ |
||
46 | public function removeEntry($msgid, $msgctxt = null) |
||
53 | |||
54 | /** |
||
55 | * @return array |
||
56 | */ |
||
57 | public function getHeaders() |
||
61 | |||
62 | /** |
||
63 | * @return Header |
||
64 | */ |
||
65 | public function getHeader() |
||
69 | |||
70 | /** |
||
71 | * @return Entry[] |
||
72 | */ |
||
73 | public function getEntries() |
||
77 | |||
78 | /** |
||
79 | * @param string $msgId |
||
80 | * @param string|null $context |
||
81 | * |
||
82 | * @return Entry|null |
||
83 | */ |
||
84 | public function getEntry($msgId, $context = null) |
||
93 | |||
94 | /** |
||
95 | * @param string $msgId |
||
96 | * @param string|null $context |
||
97 | * |
||
98 | * @return string |
||
99 | */ |
||
100 | private function getEntryHash($msgId, $context = null) |
||
104 | } |
||
105 |