@@ -162,6 +162,9 @@ |
||
162 | 162 | |
163 | 163 | } |
164 | 164 | |
165 | + /** |
|
166 | + * @param string $sessionId |
|
167 | + */ |
|
165 | 168 | public function destroy($sessionId) |
166 | 169 | { |
167 | 170 | $success = false; |
@@ -214,6 +214,9 @@ discard block |
||
214 | 214 | } |
215 | 215 | } |
216 | 216 | |
217 | + /** |
|
218 | + * @param string $service |
|
219 | + */ |
|
217 | 220 | public function setService($service, $class) |
218 | 221 | { |
219 | 222 | if($this->services === null) { |
@@ -225,6 +228,7 @@ discard block |
||
225 | 228 | |
226 | 229 | /** |
227 | 230 | * @param mixed string with reference to config |
231 | + * @param string $config |
|
228 | 232 | * @return mixed bool or config values |
229 | 233 | */ |
230 | 234 | public function getConfiguration($config = null) |
@@ -342,7 +346,6 @@ discard block |
||
342 | 346 | * Attach (or remove) multiple callbacks to an event and trigger those callbacks when that event is called. |
343 | 347 | * |
344 | 348 | * @param string $event name |
345 | - * @param mixed $value the optional value to pass to each callback |
|
346 | 349 | * @param mixed $callback the method or function to call - FALSE to remove all callbacks for event |
347 | 350 | */ |
348 | 351 | |
@@ -356,6 +359,9 @@ discard block |
||
356 | 359 | } |
357 | 360 | } |
358 | 361 | |
362 | + /** |
|
363 | + * @param string $event |
|
364 | + */ |
|
359 | 365 | public function callEvent($event, $method = false, $arguments = []) |
360 | 366 | { |
361 | 367 | if (isset(self::$events[$event])) { |
@@ -129,11 +129,18 @@ discard block |
||
129 | 129 | } |
130 | 130 | |
131 | 131 | |
132 | + /** |
|
133 | + * @param string $uri |
|
134 | + */ |
|
132 | 135 | private function isURIClean($uri, $uriChunks) |
133 | 136 | { |
134 | 137 | if (!preg_match("/^[a-z0-9:_\/\.\[\]-]+$/i", $uri) |
135 | 138 | || array_filter( |
136 | 139 | $uriChunks, |
140 | + |
|
141 | + /** |
|
142 | + * @param string $uriChunk |
|
143 | + */ |
|
137 | 144 | function ($uriChunk) { |
138 | 145 | if (strpos($uriChunk, '__') !== false) { |
139 | 146 | return true; |
@@ -148,6 +155,10 @@ discard block |
||
148 | 155 | } |
149 | 156 | |
150 | 157 | //@TODO add Security class. |
158 | + |
|
159 | + /** |
|
160 | + * @param string $data |
|
161 | + */ |
|
151 | 162 | private function normalize($data) |
152 | 163 | { |
153 | 164 | if (is_numeric($data)) { |
@@ -225,6 +236,9 @@ discard block |
||
225 | 236 | return $normalizedURI; |
226 | 237 | } |
227 | 238 | |
239 | + /** |
|
240 | + * @param string $uri |
|
241 | + */ |
|
228 | 242 | private function discoverRoute($uri) |
229 | 243 | { |
230 | 244 | $routes = $this->configuration->routes; |
@@ -259,6 +273,7 @@ discard block |
||
259 | 273 | * Normalize the $_SERVER vars for formatting the URI. |
260 | 274 | * |
261 | 275 | * @access public |
276 | + * @param string $uri |
|
262 | 277 | * @return string formatted/u/r/l |
263 | 278 | */ |
264 | 279 | private function uri($uri) |
@@ -312,6 +327,9 @@ discard block |
||
312 | 327 | return array_merge($return, array_values($uriChunks)); |
313 | 328 | } |
314 | 329 | |
330 | + /** |
|
331 | + * @param string $url |
|
332 | + */ |
|
315 | 333 | private function addQueryString($url, $key, $value) |
316 | 334 | { |
317 | 335 | $url = preg_replace('/(.*)(\?|&)' . $key . '=[^&]+?(&)(.*)/i', '$1$2$4', $url . '&'); |
@@ -323,6 +341,9 @@ discard block |
||
323 | 341 | } |
324 | 342 | } |
325 | 343 | |
344 | + /** |
|
345 | + * @param string $url |
|
346 | + */ |
|
326 | 347 | private function removeQueryString($url, $key) |
327 | 348 | { |
328 | 349 | $url = preg_replace('/(.*)(\?|&)' . $key . '=[^&]+?(&)(.*)/i', '$1$2$4', $url . '&'); |
@@ -394,7 +415,7 @@ discard block |
||
394 | 415 | * Set optional status header, and redirect to provided URL |
395 | 416 | * |
396 | 417 | * @access public |
397 | - * @return bool |
|
418 | + * @return false|null |
|
398 | 419 | */ |
399 | 420 | public function redirect($url = '/', $status = null) |
400 | 421 | { |
@@ -170,6 +170,9 @@ discard block |
||
170 | 170 | return false; |
171 | 171 | } |
172 | 172 | |
173 | + /** |
|
174 | + * @param boolean|string $layout |
|
175 | + */ |
|
173 | 176 | public function setLayout($layout) |
174 | 177 | { |
175 | 178 | |
@@ -211,6 +214,10 @@ discard block |
||
211 | 214 | * @return string processed content |
212 | 215 | */ |
213 | 216 | //@TODO: come back and clean up this and the way the view receives stuff |
217 | + |
|
218 | + /** |
|
219 | + * @param string|boolean $file |
|
220 | + */ |
|
214 | 221 | private function process($file) |
215 | 222 | { |
216 | 223 | ob_start(); |