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 | 19 | public function getJailedCollections() |
|
77 | |||
78 | /** |
||
79 | * Parse every collection and store them in the manager. |
||
80 | * |
||
81 | * @param string[][] $collections An array of definitions for collections |
||
82 | */ |
||
83 | 36 | public function parseCollections($collections) |
|
120 | |||
121 | /** |
||
122 | * {@inheritdoc} |
||
123 | */ |
||
124 | public function createNewItem($filePath) |
||
132 | |||
133 | /** |
||
134 | * {@inheritdoc} |
||
135 | */ |
||
136 | public function refreshItem($filePath) |
||
139 | |||
140 | /** |
||
141 | * {@inheritdoc} |
||
142 | */ |
||
143 | 36 | protected function handleTrackableItem($filePath, $options = array()) |
|
160 | |||
161 | /** |
||
162 | * Get the name of the Collection this Content Item belongs to. |
||
163 | * |
||
164 | * @param string $filePath |
||
165 | * |
||
166 | * @return string |
||
167 | */ |
||
168 | private function getTentativeCollectionName($filePath) |
||
180 | } |
||
181 |
It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.