PHP Class Symfony\Component\Serializer\Serializer

objects are turned into arrays by normalizers arrays are turned into various output formats by encoders $serializer->serialize($obj, 'xml') $serializer->decode($data, 'xml') $serializer->denormalize($data, 'Class', 'xml')
Author: Jordi Boggiano ([email protected])
Author: Johannes M. Schmitt ([email protected])
Author: Lukas Kahwe Smith ([email protected])
Inheritance: implements Symfony\Component\Serializer\SerializerInterface
Exibir arquivo Open project: pmjones/php-framework-benchmarks Class Usage Examples

Protected Properties

Property Type Description
$denormalizerCache
$encoders
$normalizerCache
$normalizers

Public Methods

Method Description
__construct ( array $normalizers = [], array $encoders = [] )
decode ( $data, $format )
denormalize ( $data, $type, $format = null )
deserialize ( $data, $type, $format )
encode ( $data, $format )
getEncoder ( $format )
normalize ( $data, $format = null )
serialize ( $data, $format )
supportsDecoding ( $format )
supportsDeserialization ( $format )
supportsEncoding ( $format )
supportsSerialization ( $format )

Private Methods

Method Description
denormalizeObject ( mixed $data, string $class, string $format = null ) : object Denormalizes data back into an object of the given class
normalizeObject ( object $object, string $format = null ) : array | scalar Normalizes an object into a set of arrays/scalars

Method Details

__construct() public method

public __construct ( array $normalizers = [], array $encoders = [] )
$normalizers array
$encoders array

decode() final public method

final public decode ( $data, $format )

denormalize() public method

public denormalize ( $data, $type, $format = null )

deserialize() final public method

final public deserialize ( $data, $type, $format )

encode() final public method

final public encode ( $data, $format )

getEncoder() public method

public getEncoder ( $format )

normalize() public method

public normalize ( $data, $format = null )

serialize() final public method

final public serialize ( $data, $format )

supportsDecoding() public method

public supportsDecoding ( $format )

supportsDeserialization() public method

public supportsDeserialization ( $format )

supportsEncoding() public method

public supportsEncoding ( $format )

supportsSerialization() public method

public supportsSerialization ( $format )

Property Details

$denormalizerCache protected_oe property

protected $denormalizerCache

$encoders protected_oe property

protected $encoders

$normalizerCache protected_oe property

protected $normalizerCache

$normalizers protected_oe property

protected $normalizers