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 | 16 | 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 | 19 | public function getJailedCollections() |
|
79 | |||
80 | /** |
||
81 | * Parse every collection and store them in the manager. |
||
82 | * |
||
83 | * @param string[][] $collections An array of definitions for collections |
||
84 | */ |
||
85 | 37 | public function parseCollections($collections) |
|
122 | |||
123 | /** |
||
124 | * {@inheritdoc} |
||
125 | */ |
||
126 | public function createNewItem($filePath) |
||
134 | |||
135 | /** |
||
136 | * {@inheritdoc} |
||
137 | */ |
||
138 | public function refreshItem($filePath) |
||
141 | |||
142 | /** |
||
143 | * {@inheritdoc} |
||
144 | */ |
||
145 | 37 | protected function handleTrackableItem($filePath, $options = array()) |
|
162 | |||
163 | /** |
||
164 | * Get the name of the Collection this Content Item belongs to. |
||
165 | * |
||
166 | * @param string $filePath |
||
167 | * |
||
168 | * @return string |
||
169 | */ |
||
170 | private function getTentativeCollectionName($filePath) |
||
182 | } |
||
183 |
It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.