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() |
|
66 | |||
67 | /** |
||
68 | * Parse every collection and store them in the manager. |
||
69 | * |
||
70 | * @param string[][] $collections An array of definitions for collections |
||
71 | */ |
||
72 | 37 | public function parseCollections($collections) |
|
109 | |||
110 | /** |
||
111 | * {@inheritdoc} |
||
112 | */ |
||
113 | 37 | public function createNewItem($filePath) |
|
121 | |||
122 | /** |
||
123 | * {@inheritdoc} |
||
124 | */ |
||
125 | public function refreshItem($filePath) |
||
128 | |||
129 | /** |
||
130 | * {@inheritdoc} |
||
131 | */ |
||
132 | 37 | protected function handleTrackableItem($filePath, array $options = array()) |
|
149 | |||
150 | /** |
||
151 | * Get the name of the Collection this Content Item belongs to. |
||
152 | * |
||
153 | * @param string $filePath |
||
154 | * |
||
155 | * @return string |
||
156 | */ |
||
157 | private function getTentativeCollectionName($filePath) |
||
169 | } |
||
170 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.