X7ROOT File Manager
Current Path:
/opt/alt/php54/usr/share/pear/Symfony/Component/Serializer/Encoder
opt
/
alt
/
php54
/
usr
/
share
/
pear
/
Symfony
/
Component
/
Serializer
/
Encoder
/
??
..
??
ChainDecoder.php
(1.99 KB)
??
ChainEncoder.php
(2.47 KB)
??
DecoderInterface.php
(1.19 KB)
??
EncoderInterface.php
(948 B)
??
JsonDecode.php
(3.73 KB)
??
JsonEncode.php
(1.6 KB)
??
JsonEncoder.php
(1.87 KB)
??
NormalizationAwareInterface.php
(615 B)
??
SerializerAwareEncoder.php
(764 B)
??
XmlEncoder.php
(13.49 KB)
Editing: JsonEncoder.php
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Encoder; /** * Encodes JSON data * * @author Jordi Boggiano <j.boggiano@seld.be> */ class JsonEncoder implements EncoderInterface, DecoderInterface { const FORMAT = 'json'; /** * @var JsonEncode */ protected $encodingImpl; /** * @var JsonDecode */ protected $decodingImpl; public function __construct(JsonEncode $encodingImpl = null, JsonDecode $decodingImpl = null) { $this->encodingImpl = $encodingImpl ?: new JsonEncode(); $this->decodingImpl = $decodingImpl ?: new JsonDecode(true); } /** * Returns the last encoding error (if any) * * @return integer */ public function getLastEncodingError() { return $this->encodingImpl->getLastError(); } /** * Returns the last decoding error (if any) * * @return integer */ public function getLastDecodingError() { return $this->decodingImpl->getLastError(); } /** * {@inheritdoc} */ public function encode($data, $format, array $context = array()) { return $this->encodingImpl->encode($data, self::FORMAT, $context); } /** * {@inheritdoc} */ public function decode($data, $format, array $context = array()) { return $this->decodingImpl->decode($data, self::FORMAT, $context); } /** * {@inheritdoc} */ public function supportsEncoding($format) { return self::FORMAT === $format; } /** * {@inheritdoc} */ public function supportsDecoding($format) { return self::FORMAT === $format; } }
Upload File
Create Folder