pock

SymfonySerializerAdapter extends JmsSerializerAdapter
in package

Adapts Symfony Serializer to pock's serializer contract.

$adapter = new SymfonySerializerAdapter($symfonySerializer, 'xml');
XmlSerializerFactory::setSerializer($adapter);
Tags
category

SymfonySerializerAdapter

Table of Contents

Methods

__construct()  : mixed
Store the serializer and wire format passed to its serialize method.
serialize()  : string
Serialize a value to its wire-format representation.

Methods

__construct()

Store the serializer and wire format passed to its serialize method.

public __construct(object $serializer[, string $format = 'json' ]) : mixed
Parameters
$serializer : object
$format : string = 'json'

serialize()

Serialize a value to its wire-format representation.

public serialize(mixed $data) : string
Parameters
$data : mixed
Tags
inheritDoc
Return values
string
On this page

Search results