You are here

interface SerializerInterface in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/serializer/SerializerInterface.php \Symfony\Component\Serializer\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

6 files declare their use of SerializerInterface
GetSetMethodNormalizerTest.php in vendor/symfony/serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
ObjectNormalizerTest.php in vendor/symfony/serializer/Tests/Normalizer/ObjectNormalizerTest.php
PropertyNormalizerTest.php in vendor/symfony/serializer/Tests/Normalizer/PropertyNormalizerTest.php
Serializer.php in core/modules/rest/src/Plugin/views/style/Serializer.php
Contains \Drupal\rest\Plugin\views\style\Serializer.
SerializerAwareEncoder.php in vendor/symfony/serializer/Encoder/SerializerAwareEncoder.php

... See full list

File

vendor/symfony/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