@@ -110,6 +110,9 @@ discard block |
||
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | + /** |
|
| 114 | + * @param string $key |
|
| 115 | + */ |
|
| 113 | 116 | public static function murmur($key, $seed = 0, $as_integer=false) { |
| 114 | 117 | $key = (string) $key; |
| 115 | 118 | $klen = strlen($key); |
@@ -161,6 +164,11 @@ discard block |
||
| 161 | 164 | return strtr(base64_encode(static::random_bytes($bytes)),'+/=','-_'); |
| 162 | 165 | } |
| 163 | 166 | |
| 167 | + /** |
|
| 168 | + * @param integer $bytes |
|
| 169 | + * |
|
| 170 | + * @return string |
|
| 171 | + */ |
|
| 164 | 172 | public static function random_bytes($bytes){ |
| 165 | 173 | static $randf = null; |
| 166 | 174 | if (function_exists('random_bytes')) { |
@@ -204,7 +204,6 @@ discard block |
||
| 204 | 204 | |
| 205 | 205 | /** |
| 206 | 206 | * Bind a middleware callback to invoked before the route definition |
| 207 | - * @param callable $before The callback to be invoked ($this is binded to the route object). |
|
| 208 | 207 | * @return Route |
| 209 | 208 | */ |
| 210 | 209 | public function & before($callback){ |
@@ -308,7 +307,7 @@ discard block |
||
| 308 | 307 | * @param string $pattern The URL schema with the named parameters |
| 309 | 308 | * @param string $URL The URL to process, if omitted the current request URI will be used. |
| 310 | 309 | * @param boolean $cut If true don't limit the matching to the whole URL (used for group pattern extraction) |
| 311 | - * @return array The extracted variables |
|
| 310 | + * @return callable The extracted variables |
|
| 312 | 311 | */ |
| 313 | 312 | protected static function extractVariablesFromURL($pattern, $URL=null, $cut=false){ |
| 314 | 313 | $URL = $URL ?: Request::URI(); |
@@ -331,7 +330,6 @@ discard block |
||
| 331 | 330 | |
| 332 | 331 | /** |
| 333 | 332 | * Add a route to the internal route repository. |
| 334 | - * @param Route $r |
|
| 335 | 333 | * @return Route |
| 336 | 334 | */ |
| 337 | 335 | public static function add($route){ |