Submit
Path:
~
/
/
usr
/
local
/
psa
/
admin
/
plib
/
modules
/
wp-toolkit
/
vendor
/
cerbero
/
json-parser
/
src
/
ValueObjects
/
File Content:
Config.php
<?php namespace WPToolkitDependenciesIsolationPrefix\Cerbero\JsonParser\ValueObjects; use WPToolkitDependenciesIsolationPrefix\Cerbero\JsonParser\Decoders\JsonDecoder; use WPToolkitDependenciesIsolationPrefix\Cerbero\JsonParser\Decoders\DecodedValue; use WPToolkitDependenciesIsolationPrefix\Cerbero\JsonParser\Decoders\Decoder; use WPToolkitDependenciesIsolationPrefix\Cerbero\JsonParser\Decoders\SimdjsonDecoder; use WPToolkitDependenciesIsolationPrefix\Cerbero\JsonParser\Exceptions\DecodingException; use WPToolkitDependenciesIsolationPrefix\Cerbero\JsonParser\Exceptions\SyntaxException; use WPToolkitDependenciesIsolationPrefix\Cerbero\JsonParser\Pointers\Pointer; use WPToolkitDependenciesIsolationPrefix\Cerbero\JsonParser\Pointers\Pointers; use WPToolkitDependenciesIsolationPrefix\Cerbero\JsonParser\Tokens\Parser; use Closure; /** * The configuration. * */ final class Config { /** * The JSON decoder. * * @var Decoder */ public Decoder $decoder; /** * The JSON pointers. * * @var Pointers */ public Pointers $pointers; /** * The number of bytes to read in each chunk. * * @var int<1, max> */ public int $bytes = 1024 * 8; /** * The callback to run during a decoding error. * * @var Closure */ public Closure $onDecodingError; /** * The callback to run during a syntax error. * * @var Closure */ public Closure $onSyntaxError; /** * The callback to run for wrapping the parser. * * @var Closure */ public Closure $wrapper; /** * Instantiate the class * */ public function __construct() { $this->decoder = \extension_loaded('simdjson') ? new SimdjsonDecoder() : new JsonDecoder(); $this->pointers = new Pointers(); $this->onDecodingError = fn(DecodedValue $decoded) => throw new DecodingException($decoded); $this->onSyntaxError = fn(SyntaxException $e) => throw $e; $this->wrapper = fn(Parser $parser) => $parser; } /** * Clone the configuration * * @return void */ public function __clone() : void { $this->pointers = new Pointers(); $this->pointers->add(new Pointer('', \true)); } }
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
Config.php
2292 bytes
0644
Progress.php
1864 bytes
0644
State.php
2954 bytes
0644
Tree.php
4778 bytes
0644
N4ST4R_ID | Naxtarrr