1 | <?php |
||
31 | class PageManager extends TrackingManager |
||
32 | { |
||
33 | /** @var StaticPageView[] A place to store a reference to static PageViews with titles. */ |
||
34 | private $staticPages; |
||
35 | private $configuration; |
||
36 | private $collectionManager; |
||
37 | private $dataManager; |
||
38 | |||
39 | /** |
||
40 | * PageManager constructor. |
||
41 | */ |
||
42 | 19 | public function __construct(Configuration $configuration, CollectionManager $collectionManager = null, DataManager $dataManager = null) |
|
56 | |||
57 | /** |
||
58 | * Go through all of the PageView directories and create a respective PageView for each and classify them by type. |
||
59 | * |
||
60 | * @param string[] $pageViewFolders |
||
61 | * |
||
62 | * @since 0.1.0 |
||
63 | * |
||
64 | * @throws \Exception When the EventDispatcher service couldn't be found. |
||
65 | */ |
||
66 | 19 | public function parsePageViews(array $pageViewFolders) |
|
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | * |
||
93 | * @throws \Exception |
||
94 | */ |
||
95 | 7 | public function compileManager() |
|
99 | |||
100 | /** |
||
101 | * Get all of the PageViews in an associative array with PageView types as the keys. |
||
102 | * |
||
103 | * @since 0.1.1 |
||
104 | * |
||
105 | * @return BasePageView[][] |
||
106 | */ |
||
107 | 12 | public function &getPageViews() |
|
111 | |||
112 | /** |
||
113 | * Get all of the PageViews in flat array. |
||
114 | * |
||
115 | * @since 0.1.1 |
||
116 | * |
||
117 | * @return BasePageView[] |
||
118 | */ |
||
119 | 17 | public function &getPageViewsFlattened() |
|
123 | |||
124 | /** |
||
125 | * Get the static PageViews tracked by this manager indexed by their title. |
||
126 | * |
||
127 | * @since 0.1.0 |
||
128 | * |
||
129 | * @return StaticPageView[] |
||
130 | */ |
||
131 | 1 | public function getStaticPageViews() |
|
135 | |||
136 | /** |
||
137 | * Get the jailed version of the static PageViews indexed by their title. |
||
138 | * |
||
139 | * @since 0.1.0 |
||
140 | * |
||
141 | * @return JailedDocument[] |
||
142 | */ |
||
143 | 1 | public function getJailedStaticPageViews() |
|
154 | |||
155 | /** |
||
156 | * Add a new ContentItem to the respective parent PageView of the ContentItem. |
||
157 | * |
||
158 | * @param ContentItem $contentItem |
||
159 | * |
||
160 | * @since 0.1.0 |
||
161 | */ |
||
162 | 1 | public function trackNewContentItem(&$contentItem) |
|
167 | |||
168 | /** |
||
169 | * {@inheritdoc} |
||
170 | */ |
||
171 | 18 | protected function &handleTrackableItem($filePath, array $options = array()) |
|
200 | |||
201 | /** |
||
202 | * Handle special behavior and treatment for static PageViews while we're iterating through them. |
||
203 | * |
||
204 | * @param StaticPageView $pageView |
||
205 | * |
||
206 | * @since 0.1.0 |
||
207 | */ |
||
208 | 12 | private function handleTrackableStaticPageView(&$pageView) |
|
221 | |||
222 | /** |
||
223 | * Handle special behavior and treatment for dynamic PageViews while we're iterating through them. |
||
224 | * |
||
225 | * @param DynamicPageView $pageView |
||
226 | * |
||
227 | * @since 0.1.0 |
||
228 | * |
||
229 | * @throws \Exception |
||
230 | */ |
||
231 | 4 | private function handleTrackableDynamicPageView(&$pageView) |
|
272 | |||
273 | /** |
||
274 | * Handle special behavior and treatment for repeater PageViews while we're iterating through them. |
||
275 | * |
||
276 | * @param RepeaterPageView $pageView |
||
277 | * |
||
278 | * @since 0.2.0 |
||
279 | */ |
||
280 | 2 | private function handleTrackableRepeaterPageView(&$pageView) |
|
287 | } |
||
288 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..