1 | <?php |
||
30 | class PageManager extends TrackingManager |
||
31 | { |
||
32 | /** @var StaticPageView[] A place to store a reference to static PageViews with titles. */ |
||
33 | private $staticPages; |
||
34 | private $configuration; |
||
35 | private $collectionManager; |
||
36 | private $dataManager; |
||
37 | |||
38 | /** |
||
39 | * PageManager constructor. |
||
40 | */ |
||
41 | 7 | public function __construct(Configuration $configuration, CollectionManager $collectionManager = null, DataManager $dataManager = null) |
|
55 | |||
56 | /** |
||
57 | * Go through all of the PageView directories and create a respective PageView for each and classify them by type. |
||
58 | * |
||
59 | * @param string[] $pageViewFolders |
||
60 | * |
||
61 | * @since 0.1.0 |
||
62 | * |
||
63 | * @throws \Exception When the EventDispatcher service couldn't be found. |
||
64 | */ |
||
65 | 7 | public function parsePageViews(array $pageViewFolders) |
|
88 | |||
89 | /** |
||
90 | * {@inheritdoc} |
||
91 | * |
||
92 | * @throws \Exception |
||
93 | */ |
||
94 | 7 | public function compileManager() |
|
98 | |||
99 | /** |
||
100 | * Get all of the PageViews in an associative array with PageView types as the keys. |
||
101 | * |
||
102 | * @since 0.1.1 |
||
103 | * |
||
104 | * @return BasePageView[][] |
||
105 | */ |
||
106 | public function &getPageViews() |
||
110 | |||
111 | /** |
||
112 | * Get all of the PageViews in flat array. |
||
113 | * |
||
114 | * @since 0.1.1 |
||
115 | * |
||
116 | * @return BasePageView[] |
||
117 | */ |
||
118 | 5 | public function &getPageViewsFlattened() |
|
122 | |||
123 | /** |
||
124 | * Get the static PageViews tracked by this manager indexed by their title. |
||
125 | * |
||
126 | * @since 0.1.0 |
||
127 | * |
||
128 | * @return StaticPageView[] |
||
129 | */ |
||
130 | 1 | public function getStaticPageViews() |
|
134 | |||
135 | /** |
||
136 | * Get the jailed version of the static PageViews indexed by their title. |
||
137 | * |
||
138 | * @since 0.1.0 |
||
139 | * |
||
140 | * @return JailedDocument[] |
||
141 | */ |
||
142 | 1 | public function getJailedStaticPageViews() |
|
153 | |||
154 | /** |
||
155 | * Add a new ContentItem to the respective parent PageView of the ContentItem. |
||
156 | * |
||
157 | * @param ContentItem $contentItem |
||
158 | * |
||
159 | * @since 0.1.0 |
||
160 | */ |
||
161 | 1 | public function trackNewContentItem(&$contentItem) |
|
166 | |||
167 | /** |
||
168 | * {@inheritdoc} |
||
169 | */ |
||
170 | 6 | protected function &handleTrackableItem($filePath, array $options = array()) |
|
193 | |||
194 | /** |
||
195 | * Handle special behavior and treatment for static PageViews while we're iterating through them. |
||
196 | * |
||
197 | * @param StaticPageView $pageView |
||
198 | * |
||
199 | * @since 0.1.0 |
||
200 | */ |
||
201 | 2 | private function handleTrackableStaticPageView(&$pageView) |
|
210 | |||
211 | /** |
||
212 | * Handle special behavior and treatment for dynamic PageViews while we're iterating through them. |
||
213 | * |
||
214 | * @param DynamicPageView $pageView |
||
215 | * |
||
216 | * @since 0.1.0 |
||
217 | * |
||
218 | * @throws \Exception |
||
219 | */ |
||
220 | 4 | private function handleTrackableDynamicPageView(&$pageView) |
|
259 | } |
||
260 |
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..