@@ -56,6 +56,9 @@ |
||
| 56 | 56 | class PHPContext { |
| 57 | 57 | protected $data = []; |
| 58 | 58 | |
| 59 | + /** |
|
| 60 | + * @param string $path |
|
| 61 | + */ |
|
| 59 | 62 | public function __construct($data=[], $path=null){ |
| 60 | 63 | $this->data = $data; |
| 61 | 64 | } |
@@ -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')) { |