1 | <?php |
||
19 | class CollectionManager extends TrackingManager |
||
20 | { |
||
21 | /** @var string[][] A copy of the collection definitions to be available for later usage. */ |
||
22 | private $collectionDefinitions; |
||
23 | private $configuration; |
||
24 | |||
25 | /** |
||
26 | * CollectionManager constructor. |
||
27 | */ |
||
28 | 37 | public function __construct(Configuration $configuration) |
|
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | 5 | public function compileManager() |
|
48 | |||
49 | /** |
||
50 | * Get all of the ContentItems grouped by Collection name. |
||
51 | * |
||
52 | * @return ContentItem[][] |
||
|
|||
53 | */ |
||
54 | 16 | public function &getCollections() |
|
58 | |||
59 | /** |
||
60 | * Get a ContentItem from a Collection pased on it's path. |
||
61 | * |
||
62 | * @param string $filePath |
||
63 | * |
||
64 | * @throws TrackedItemNotFoundException |
||
65 | * |
||
66 | * @return ContentItem |
||
67 | */ |
||
68 | 1 | public function &getContentItem($filePath) |
|
77 | |||
78 | /** |
||
79 | * A jailed representation of CollectionManager::getCollections(). |
||
80 | * |
||
81 | * @return JailedDocument[][] |
||
82 | */ |
||
83 | 19 | public function getJailedCollections() |
|
87 | |||
88 | /** |
||
89 | * Parse every collection and store them in the manager. |
||
90 | * |
||
91 | * @param string[][] $collections An array of definitions for collections |
||
92 | */ |
||
93 | 37 | public function parseCollections($collections) |
|
135 | |||
136 | /** |
||
137 | * {@inheritdoc} |
||
138 | */ |
||
139 | public function createNewItem($filePath) |
||
147 | |||
148 | /** |
||
149 | * {@inheritdoc} |
||
150 | */ |
||
151 | public function refreshItem($filePath) |
||
154 | |||
155 | /** |
||
156 | * {@inheritdoc} |
||
157 | */ |
||
158 | 37 | protected function handleTrackableItem($filePath, array $options = array()) |
|
174 | |||
175 | /** |
||
176 | * Get the name of the Collection this Content Item belongs to. |
||
177 | * |
||
178 | * @param string $filePath |
||
179 | * |
||
180 | * @return string |
||
181 | */ |
||
182 | private function getTentativeCollectionName($filePath) |
||
194 | } |
||
195 |
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.