You are here

public function SerializerInterface::serialize in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/SerializerInterface.php \Symfony\Component\Serializer\SerializerInterface::serialize()

Serializes data in the appropriate format.

Parameters

mixed $data any data:

string $format format name:

array $context options normalizers/encoders have access to:

Return value

string

1 method overrides SerializerInterface::serialize()
Serializer::serialize in vendor/symfony/serializer/Serializer.php
Serializes data in the appropriate format.

File

vendor/symfony/serializer/SerializerInterface.php, line 30

Class

SerializerInterface
Defines the interface of the Serializer.

Namespace

Symfony\Component\Serializer

Code

public function serialize($data, $format, array $context = array());