SerializerInterface

SerializerInterface

interface SerializerInterface

Defines the interface of the Serializer.

Methods

string serialize(mixed $data, string $format, array $context = array())

Serializes data in the appropriate format.

object deserialize(mixed $data, string $type, string $format, array $context = array())

Deserializes data into the given type.

Details

string serialize(mixed $data, string $format, array $context = array())

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

object deserialize(mixed $data, string $type, string $format, array $context = array())

Deserializes data into the given type.

Parameters

mixed $data
string $type
string $format
array $context

Return Value

object

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.2/Symfony/Component/Serializer/SerializerInterface.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部