1 | <?php |
||
19 | class CollectionManager extends TrackingManager |
||
20 | { |
||
21 | /** |
||
22 | * A copy of the collection definitions to be available for later usage. |
||
23 | * |
||
24 | * @var string[][] |
||
25 | */ |
||
26 | private $collectionDefinitions; |
||
27 | |||
28 | /** |
||
29 | * Get all of the ContentItems grouped by Collection name. |
||
30 | * |
||
31 | * @return ContentItem[][] |
||
32 | */ |
||
33 | 15 | public function &getCollections() |
|
37 | |||
38 | /** |
||
39 | * Get a ContentItem from a Collection pased on it's path. |
||
40 | * |
||
41 | * @param string $filePath |
||
42 | * |
||
43 | * @throws TrackedItemNotFoundException |
||
44 | * |
||
45 | * @return ContentItem |
||
46 | */ |
||
47 | 1 | public function &getContentItem($filePath) |
|
56 | |||
57 | /** |
||
58 | * A jailed representation of CollectionManager::getCollections(). |
||
59 | * |
||
60 | * @return JailedDocument[][] |
||
61 | */ |
||
62 | 18 | public function getJailedCollections() |
|
85 | |||
86 | /** |
||
87 | * Parse every collection and store them in the manager. |
||
88 | * |
||
89 | * @param string[][] $collections An array of definitions for collections |
||
90 | */ |
||
91 | 35 | public function parseCollections($collections) |
|
128 | |||
129 | /** |
||
130 | * {@inheritdoc} |
||
131 | */ |
||
132 | public function createNewItem($filePath) |
||
140 | |||
141 | /** |
||
142 | * {@inheritdoc} |
||
143 | */ |
||
144 | public function refreshItem($filePath) |
||
147 | |||
148 | /** |
||
149 | * {@inheritdoc} |
||
150 | */ |
||
151 | 35 | protected function handleTrackableItem($filePath, $options = array()) |
|
168 | |||
169 | /** |
||
170 | * Get the name of the Collection this Content Item belongs to. |
||
171 | * |
||
172 | * @param string $filePath |
||
173 | * |
||
174 | * @return string |
||
175 | */ |
||
176 | private function getTentativeCollectionName($filePath) |
||
188 | } |
||
189 |
It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.