pock

JmsSerializerAdapter
in package
implements SerializerInterface

Adapts a JMS-compatible serializer object to pock's serializer contract.

$adapter = new JmsSerializerAdapter($jmsSerializer, 'json');
JsonSerializerFactory::setSerializer($adapter);
Tags
category

JmsSerializerAdapter

Table of Contents

Interfaces

SerializerInterface
Converts PHP values to the JSON or XML string used by structured body helpers.

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