/
home
/
u417168693
/
domains
/
devtechera.com
/
public_html
/
system
/
ThirdParty
/
Kint
/
Parser
/
/home/u417168693/domains/devtechera.com/public_html/system/ThirdParty/Kint/Parser
mkdir
upload
Name
Size
Mode
Actions
AbstractPlugin.php
1536
0644
edit
dl
rm
ArrayLimitPlugin.php
4120
0644
edit
dl
rm
ArrayObjectPlugin.php
1960
0644
edit
dl
rm
Base64Plugin.php
2847
0644
edit
dl
rm
BinaryPlugin.php
1749
0644
edit
dl
rm
BlacklistPlugin.php
2906
0644
edit
dl
rm
ClassMethodsPlugin.php
3600
0644
edit
dl
rm
ClassStaticsPlugin.php
5080
0644
edit
dl
rm
ClosurePlugin.php
3093
0644
edit
dl
rm
ColorPlugin.php
2127
0644
edit
dl
rm
ConstructablePluginInterface.php
1365
0644
edit
dl
rm
DateTimePlugin.php
1793
0644
edit
dl
rm
DOMDocumentPlugin.php
12213
0644
edit
dl
rm
EnumPlugin.php
2722
0644
edit
dl
rm
FsPathPlugin.php
2417
0644
edit
dl
rm
IteratorPlugin.php
3391
0644
edit
dl
rm
JsonPlugin.php
2323
0644
edit
dl
rm
MicrotimePlugin.php
3294
0644
edit
dl
rm
MysqliPlugin.php
6550
0644
edit
dl
rm
Parser.php
20674
0644
edit
dl
rm
PluginInterface.php
1558
0644
edit
dl
rm
ProxyPlugin.php
2254
0644
edit
dl
rm
SerializePlugin.php
3572
0644
edit
dl
rm
SimpleXMLElementPlugin.php
7553
0644
edit
dl
rm
SplFileInfoPlugin.php
1911
0644
edit
dl
rm
SplObjectStoragePlugin.php
1890
0644
edit
dl
rm
StreamPlugin.php
2629
0644
edit
dl
rm
TablePlugin.php
3513
0644
edit
dl
rm
ThrowablePlugin.php
1994
0644
edit
dl
rm
TimestampPlugin.php
2538
0644
edit
dl
rm
ToStringPlugin.php
2129
0644
edit
dl
rm
TracePlugin.php
3663
0644
edit
dl
rm
XmlPlugin.php
4695
0644
edit
dl
rm
Edit:
/home/u417168693/domains/devtechera.com/public_html/system/ThirdParty/Kint/Parser/JsonPlugin.php
(2323B)
<?php declare(strict_types=1); /* * The MIT License (MIT) * * Copyright (c) 2013 Jonathan Vollebregt (jnvsor@gmail.com), Rokas Šleinius (raveren@gmail.com) * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ namespace Kint\Parser; use Kint\Zval\Representation\Representation; use Kint\Zval\Value; class JsonPlugin extends AbstractPlugin { public function getTypes(): array { return ['string']; } public function getTriggers(): int { return Parser::TRIGGER_SUCCESS; } public function parse(&$var, Value &$o, int $trigger): void { if (!isset($var[0]) || ('{' !== $var[0] && '[' !== $var[0])) { return; } $json = \json_decode($var, true); if (!$json) { return; } $json = (array) $json; $base_obj = new Value(); $base_obj->depth = $o->depth; if ($o->access_path) { $base_obj->access_path = 'json_decode('.$o->access_path.', true)'; } $r = new Representation('Json'); $r->contents = $this->parser->parse($json, $base_obj); if (!\in_array('depth_limit', $r->contents->hints, true)) { $r->contents = $r->contents->value->contents; } $o->addRepresentation($r, 0); } }
Save
cmd:
run