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

4 files declare their use of SerializerInterface
Serializer.php in drupal/core/modules/rest/lib/Drupal/rest/Plugin/views/style/Serializer.php
Contains \Drupal\rest\Plugin\views\style\Serializer.
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
   * @param array  $context options normalizers/encoders have access to
   *
   * @return string
   */
  public function serialize($data, $format, array $context = array());

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

}

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