GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /nginx/html/Student/JimMartinson/Lab12/drupal/core/modules/serialization/src/Encoder/ |
Upload File : |
<?php namespace Drupal\serialization\Encoder; use Symfony\Component\Serializer\Encoder\EncoderInterface; use Symfony\Component\Serializer\Encoder\DecoderInterface; use Symfony\Component\Serializer\Encoder\SerializerAwareEncoder; use Symfony\Component\Serializer\Encoder\XmlEncoder as BaseXmlEncoder; /** * Adds XML support for serializer. * * This acts as a wrapper class for Symfony's XmlEncoder so that it is not * implementing NormalizationAwareInterface, and can be normalized externally. */ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, DecoderInterface { /** * The formats that this Encoder supports. * * @var array */ static protected $format = ['xml']; /** * An instance of the Symfony XmlEncoder to perform the actual encoding. * * @var \Symfony\Component\Serializer\Encoder\XmlEncoder */ protected $baseEncoder; /** * Gets the base encoder instance. * * @return \Symfony\Component\Serializer\Encoder\XmlEncoder * The base encoder. */ public function getBaseEncoder() { if (!isset($this->baseEncoder)) { $this->baseEncoder = new BaseXmlEncoder(); $this->baseEncoder->setSerializer($this->serializer); } return $this->baseEncoder; } /** * Sets the base encoder instance. * * @param \Symfony\Component\Serializer\Encoder\XmlEncoder $encoder */ public function setBaseEncoder($encoder) { $this->baseEncoder = $encoder; } /** * {@inheritdoc} */ public function encode($data, $format, array $context = []){ return $this->getBaseEncoder()->encode($data, $format, $context); } /** * {@inheritdoc} */ public function supportsEncoding($format) { return in_array($format, static::$format); } /** * {@inheritdoc} */ public function decode($data, $format, array $context = []){ return $this->getBaseEncoder()->decode($data, $format, $context); } /** * {@inheritdoc} */ public function supportsDecoding($format) { return in_array($format, static::$format); } }