Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.19.255.50
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
wb /
vendor /
jms /
serializer /
src /
Delete
Unzip
Name
Size
Permission
Date
Action
Accessor
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
Annotation
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
Builder
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
Construction
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
ContextFactory
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
EventDispatcher
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
Exception
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
Exclusion
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
Expression
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
GraphNavigator
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
Handler
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
Metadata
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
Naming
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
Ordering
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
Twig
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
Type
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
Visitor
[ DIR ]
drwxrwxr-x
2022-08-24 15:26
AbstractVisitor.php
2.98
KB
-rw-rw-r--
2022-08-24 15:26
ArrayTransformerInterface.php
917
B
-rw-rw-r--
2022-08-24 15:26
Context.php
6.08
KB
-rw-rw-r--
2022-08-24 15:26
DeserializationContext.php
775
B
-rw-rw-r--
2022-08-24 15:26
Functions.php
414
B
-rw-rw-r--
2022-08-24 15:26
GraphNavigator.php
1.05
KB
-rw-rw-r--
2022-08-24 15:26
GraphNavigatorInterface.php
1018
B
-rw-rw-r--
2022-08-24 15:26
JsonDeserializationStrictVisitor.php
3.99
KB
-rw-rw-r--
2022-08-24 15:26
JsonDeserializationVisitor.php
6.43
KB
-rw-rw-r--
2022-08-24 15:26
JsonSerializationVisitor.php
5.02
KB
-rw-rw-r--
2022-08-24 15:26
NullAwareVisitorInterface.php
346
B
-rw-rw-r--
2022-08-24 15:26
SerializationContext.php
3.44
KB
-rw-rw-r--
2022-08-24 15:26
Serializer.php
8.78
KB
-rw-rw-r--
2022-08-24 15:26
SerializerBuilder.php
19.95
KB
-rw-rw-r--
2022-08-24 15:26
SerializerInterface.php
768
B
-rw-rw-r--
2022-08-24 15:26
VisitorInterface.php
938
B
-rw-rw-r--
2022-08-24 15:26
XmlDeserializationVisitor.php
15.94
KB
-rw-rw-r--
2022-08-24 15:26
XmlSerializationVisitor.php
16.18
KB
-rw-rw-r--
2022-08-24 15:26
Save
Rename
<?php declare(strict_types=1); namespace JMS\Serializer; use JMS\Serializer\Exception\NotAcceptableException; use JMS\Serializer\Exception\RuntimeException; use JMS\Serializer\Metadata\ClassMetadata; use JMS\Serializer\Metadata\PropertyMetadata; use JMS\Serializer\Visitor\SerializationVisitorInterface; final class JsonSerializationVisitor extends AbstractVisitor implements SerializationVisitorInterface { /** * @var int */ private $options; /** * @var array */ private $dataStack; /** * @var \ArrayObject|array */ private $data; public function __construct( int $options = JSON_PRESERVE_ZERO_FRACTION ) { $this->dataStack = []; $this->options = $options; } /** * {@inheritdoc} */ public function visitNull($data, array $type) { return null; } /** * {@inheritdoc} */ public function visitString(string $data, array $type) { return $data; } /** * {@inheritdoc} */ public function visitBoolean(bool $data, array $type) { return $data; } /** * {@inheritdoc} */ public function visitInteger(int $data, array $type) { return $data; } /** * {@inheritdoc} */ public function visitDouble(float $data, array $type) { $percision = $type['params'][0] ?? null; if (!is_int($percision)) { return $data; } $roundMode = $type['params'][1] ?? null; $roundMode = $this->mapRoundMode($roundMode); return round($data, $percision, $roundMode); } /** * @param array $data * @param array $type * * @return array|\ArrayObject */ public function visitArray(array $data, array $type) { \array_push($this->dataStack, $data); $rs = isset($type['params'][1]) ? new \ArrayObject() : []; $isList = isset($type['params'][0]) && !isset($type['params'][1]); $elType = $this->getElementType($type); foreach ($data as $k => $v) { try { $v = $this->navigator->accept($v, $elType); } catch (NotAcceptableException $e) { continue; } if ($isList) { $rs[] = $v; } else { $rs[$k] = $v; } } \array_pop($this->dataStack); return $rs; } public function startVisitingObject(ClassMetadata $metadata, object $data, array $type): void { \array_push($this->dataStack, $this->data); $this->data = true === $metadata->isMap ? new \ArrayObject() : []; } /** * @return array|\ArrayObject */ public function endVisitingObject(ClassMetadata $metadata, object $data, array $type) { $rs = $this->data; $this->data = \array_pop($this->dataStack); if (true !== $metadata->isList && empty($rs)) { return new \ArrayObject(); } return $rs; } /** * {@inheritdoc} */ public function visitProperty(PropertyMetadata $metadata, $v): void { try { $v = $this->navigator->accept($v, $metadata->type); } catch (NotAcceptableException $e) { return; } if (true === $metadata->skipWhenEmpty && ($v instanceof \ArrayObject || \is_array($v)) && 0 === count($v)) { return; } if ($metadata->inline) { if (\is_array($v) || ($v instanceof \ArrayObject)) { // concatenate the two array-like structures // is there anything faster? foreach ($v as $key => $value) { $this->data[$key] = $value; } } } else { $this->data[$metadata->serializedName] = $v; } } /** * Checks if some data key exists. */ public function hasData(string $key): bool { return isset($this->data[$key]); } /** * @deprecated Use `::visitProperty(new StaticPropertyMetadata('', 'name', 'value'), 'value')` instead * * Allows you to replace existing data on the current object element. * * @param mixed $value This value must either be a regular scalar, or an array. * It must not contain any objects anymore. */ public function setData(string $key, $value): void { $this->data[$key] = $value; } /** * {@inheritdoc} */ public function getResult($data) { $result = @json_encode($data, $this->options); switch (json_last_error()) { case JSON_ERROR_NONE: return $result; case JSON_ERROR_UTF8: throw new RuntimeException('Your data could not be encoded because it contains invalid UTF8 characters.'); default: throw new RuntimeException(sprintf('An error occurred while encoding your data (error code %d).', json_last_error())); } } }