interface SerializerInterface

Defines the interface of the Serializer

@author Jordi Boggiano <j.boggiano@seld.be>

Hierarchy

Expanded class hierarchy of SerializerInterface

All classes that implement SerializerInterface

3 files declare their use of SerializerInterface
SerializerAwareEncoder.php in drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/SerializerAwareEncoder.php
SerializerAwareInterface.php in drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/SerializerAwareInterface.php
SerializerAwareNormalizer.php in drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/SerializerAwareNormalizer.php

File

drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/SerializerInterface.php, line 19

Namespace

Symfony\Component\Serializer
View source
interface SerializerInterface {

  /**
   * Serializes data in the appropriate format
   *
   * @param mixed  $data   any data
   * @param string $format format name
   * @return string
   */
  public function serialize($data, $format);

  /**
   * Deserializes data into the given type.
   *
   * @param mixed  $data
   * @param string $type
   * @param string $format
   */
  public function deserialize($data, $type, $format);

}

Members

Namesort descending Modifiers Type Description Overrides
SerializerInterface::deserialize public function Deserializes data into the given type. 1
SerializerInterface::serialize public function Serializes data in the appropriate format 1