@@ -30,6 +30,9 @@ |
||
30 | 30 | self::$dump[$source] = [$var, $expand]; |
31 | 31 | } |
32 | 32 | |
33 | + /** |
|
34 | + * @param string $message |
|
35 | + */ |
|
33 | 36 | public static function warn($message) |
34 | 37 | { |
35 | 38 | self::$warn[] = $message; |
@@ -33,6 +33,10 @@ discard block |
||
33 | 33 | return false; |
34 | 34 | } |
35 | 35 | |
36 | + /** |
|
37 | + * @param string $event |
|
38 | + * @param string $callback |
|
39 | + */ |
|
36 | 40 | public static function has($object, $event, $callback = null) |
37 | 41 | { |
38 | 42 | if (isset($callback)) { |
@@ -44,6 +48,9 @@ discard block |
||
44 | 48 | } |
45 | 49 | } |
46 | 50 | |
51 | + /** |
|
52 | + * @param string $event |
|
53 | + */ |
|
47 | 54 | public static function trigger($object, $event, array $parameters = []) |
48 | 55 | { |
49 | 56 | foreach (self::$eventStack as $className => $eventStack) { |
@@ -196,6 +196,9 @@ discard block |
||
196 | 196 | return $type; |
197 | 197 | } |
198 | 198 | |
199 | + /** |
|
200 | + * @return string |
|
201 | + */ |
|
199 | 202 | public static function getExceptionChannelMap(Exception $exception) |
200 | 203 | { |
201 | 204 | if ($exception instanceof ErrorException) { |
@@ -211,6 +214,9 @@ discard block |
||
211 | 214 | } |
212 | 215 | } |
213 | 216 | |
217 | + /** |
|
218 | + * @return string |
|
219 | + */ |
|
214 | 220 | public static function getExceptionLevelMap(Exception $exception) |
215 | 221 | { |
216 | 222 | if ($exception instanceof ErrorException) { |
@@ -266,6 +272,9 @@ discard block |
||
266 | 272 | |
267 | 273 | static $firstApplicationFileExpanded = false; |
268 | 274 | |
275 | + /** |
|
276 | + * @param string $arguments |
|
277 | + */ |
|
269 | 278 | protected static function embedScript($filename = null, $line = null, $arguments = null, $expand = false) |
270 | 279 | { |
271 | 280 | $lineOffset = 5; |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | * |
117 | 117 | * @param string $url |
118 | 118 | * @param bool|string $toFile |
119 | - * @param bool|array $header |
|
119 | + * @param string[] $header |
|
120 | 120 | * @return string |
121 | 121 | * @throws Exception |
122 | 122 | */ |
@@ -215,6 +215,9 @@ discard block |
||
215 | 215 | return $output; |
216 | 216 | } |
217 | 217 | |
218 | + /** |
|
219 | + * @param string $filename |
|
220 | + */ |
|
218 | 221 | public static function download($url, $filename) |
219 | 222 | { |
220 | 223 | return self::get($url, $filename); |
@@ -222,6 +225,7 @@ discard block |
||
222 | 225 | |
223 | 226 | /** |
224 | 227 | * @source http://stackoverflow.com/a/5498992/938297 |
228 | + * @param resource $ch |
|
225 | 229 | */ |
226 | 230 | private static function _curl_exec_follow(&$ch, $redirects = 20, $curlopt_header = false) |
227 | 231 | { |
@@ -169,6 +169,9 @@ discard block |
||
169 | 169 | return false; |
170 | 170 | } |
171 | 171 | |
172 | + /** |
|
173 | + * @param Ajde_Session $session |
|
174 | + */ |
|
172 | 175 | private static function _getTokenDictionary(&$session = null) |
173 | 176 | { |
174 | 177 | if (!isset($session)) { |
@@ -226,6 +229,7 @@ discard block |
||
226 | 229 | |
227 | 230 | /** |
228 | 231 | * Helpers |
232 | + * @param string $key |
|
229 | 233 | */ |
230 | 234 | public function get($key) |
231 | 235 | { |
@@ -285,6 +289,10 @@ discard block |
||
285 | 289 | return $this->getString($key, $default); |
286 | 290 | } |
287 | 291 | |
292 | + /** |
|
293 | + * @param string $key |
|
294 | + * @param boolean $default |
|
295 | + */ |
|
288 | 296 | public function getInt($key, $default) |
289 | 297 | { |
290 | 298 | return $this->getInteger($key, $default); |
@@ -310,6 +318,9 @@ discard block |
||
310 | 318 | return $this->getParam($key, $default, self::TYPE_FLOAT); |
311 | 319 | } |
312 | 320 | |
321 | + /** |
|
322 | + * @param string $key |
|
323 | + */ |
|
313 | 324 | public function getRaw($key, $default = null) |
314 | 325 | { |
315 | 326 | return $this->getParam($key, $default, self::TYPE_RAW); |
@@ -337,6 +348,9 @@ discard block |
||
337 | 348 | return $this->_postData; |
338 | 349 | } |
339 | 350 | |
351 | + /** |
|
352 | + * @param string $key |
|
353 | + */ |
|
340 | 354 | public function getPostParam($key, $default = null, $type = self::TYPE_STRING) |
341 | 355 | { |
342 | 356 | return $this->getParam($key, $default, $type, true); |
@@ -347,6 +361,9 @@ discard block |
||
347 | 361 | return $this->getParam($key, $default, self::TYPE_RAW, true); |
348 | 362 | } |
349 | 363 | |
364 | + /** |
|
365 | + * @param string $key |
|
366 | + */ |
|
350 | 367 | public function hasPostParam($key) |
351 | 368 | { |
352 | 369 | return array_key_exists($key, $this->_postData); |
@@ -136,6 +136,9 @@ discard block |
||
136 | 136 | Ajde::app()->getDocument()->setLayout(new Ajde_Layout('empty')); |
137 | 137 | } |
138 | 138 | |
139 | + /** |
|
140 | + * @param string $name |
|
141 | + */ |
|
139 | 142 | public function addHeader($name, $value) |
140 | 143 | { |
141 | 144 | $headers = []; |
@@ -146,6 +149,9 @@ discard block |
||
146 | 149 | $this->set("headers", $headers); |
147 | 150 | } |
148 | 151 | |
152 | + /** |
|
153 | + * @param string $name |
|
154 | + */ |
|
149 | 155 | public function removeHeader($name) |
150 | 156 | { |
151 | 157 | // TODO: also remove from $this->_data['headers'] |
@@ -125,6 +125,10 @@ |
||
125 | 125 | */ |
126 | 126 | // protected function _loadTranslationData($filename, $locale, array $options = array()) |
127 | 127 | // AJDE : We use this method directly, so it must be public |
128 | + |
|
129 | + /** |
|
130 | + * @param string $filename |
|
131 | + */ |
|
128 | 132 | public function _loadTranslationData($filename, $locale, array $options = []) |
129 | 133 | { |
130 | 134 | $this->_data = []; |
@@ -30,6 +30,9 @@ |
||
30 | 30 | $this->set("name", $name); |
31 | 31 | } |
32 | 32 | |
33 | + /** |
|
34 | + * @param string $style |
|
35 | + */ |
|
33 | 36 | public function setStyle($style) |
34 | 37 | { |
35 | 38 | $this->set("style", $style); |
@@ -29,6 +29,9 @@ |
||
29 | 29 | return $getWriters; |
30 | 30 | } |
31 | 31 | |
32 | + /** |
|
33 | + * @param string $level |
|
34 | + */ |
|
32 | 35 | private static function shouldLog($level) |
33 | 36 | { |
34 | 37 | $configLevel = current(explode(':', Config::get('logLevel'))); |