$53 GRAYBYTE WORDPRESS FILE MANAGER $22

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/php53/usr/share/pear/Symfony/Component/Serializer/Encoder/

HOME
Current File : /opt/alt/php53/usr/share/pear/Symfony/Component/Serializer/Encoder//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;
    }
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
31 Aug 2024 7.05 AM
root / root
0755
ChainDecoder.php
1.985 KB
18 Dec 2019 6.20 PM
root / root
0644
ChainEncoder.php
2.468 KB
18 Dec 2019 6.20 PM
root / root
0644
DecoderInterface.php
1.188 KB
18 Dec 2019 6.20 PM
root / root
0644
EncoderInterface.php
0.926 KB
18 Dec 2019 6.20 PM
root / root
0644
JsonDecode.php
3.727 KB
18 Dec 2019 6.20 PM
root / root
0644
JsonEncode.php
1.602 KB
18 Dec 2019 6.20 PM
root / root
0644
JsonEncoder.php
1.865 KB
18 Dec 2019 6.20 PM
root / root
0644
NormalizationAwareInterface.php
0.601 KB
18 Dec 2019 6.20 PM
root / root
0644
SerializerAwareEncoder.php
0.746 KB
18 Dec 2019 6.20 PM
root / root
0644
XmlEncoder.php
13.487 KB
18 Dec 2019 6.20 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF