1 | <?php |
||
17 | class CollectionManager extends TrackingManager |
||
18 | { |
||
19 | /** |
||
20 | * A copy of the collection definitions to be available for later usage |
||
21 | * |
||
22 | * @var string[][] |
||
23 | */ |
||
24 | private $collectionDefinitions; |
||
25 | |||
26 | /** |
||
27 | * @param string $filePath |
||
28 | * |
||
29 | * @return ContentItem |
||
30 | */ |
||
31 | 1 | public function &getContentItem ($filePath) |
|
32 | { |
||
33 | 1 | return $this->trackedItemsFlattened[$filePath]; |
|
34 | } |
||
35 | |||
36 | /** |
||
37 | * Get all of the Content Items grouped by Collection |
||
38 | * |
||
39 | * @return ContentItem[][] |
||
40 | */ |
||
41 | 2 | public function &getCollections () |
|
42 | { |
||
43 | 2 | return $this->trackedItems; |
|
44 | } |
||
45 | |||
46 | /** |
||
47 | * Get the name of the Collection this Content Item belongs to |
||
48 | * |
||
49 | * @param string $filePath |
||
50 | * |
||
51 | * @return string |
||
52 | */ |
||
53 | public function getTentativeCollectionName ($filePath) |
||
65 | |||
66 | /** |
||
67 | * Parse every collection and store them in the manager |
||
68 | * |
||
69 | * @param string[][] $collections An array of definitions for collections |
||
70 | */ |
||
71 | 4 | public function parseCollections ($collections) |
|
107 | |||
108 | /** |
||
109 | * {@inheritdoc} |
||
110 | */ |
||
111 | 4 | public function createNewItem($filePath) |
|
119 | |||
120 | /** |
||
121 | * {@inheritdoc} |
||
122 | */ |
||
123 | public function refreshItem($filePath) |
||
127 | |||
128 | /** |
||
129 | * {@inheritdoc} |
||
130 | */ |
||
131 | 4 | protected function handleTrackableItem($filePath, $options = array()) |
|
148 | } |