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
Afficher le fichier Open project: pmjones/php-framework-benchmarks Class Usage Examples

Protected Properties

Свойство Type Description
$denormalizerCache
$encoders
$normalizerCache
$normalizers

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

decode() final public méthode

final public decode ( $data, $format )

denormalize() public méthode

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

deserialize() final public méthode

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

encode() final public méthode

final public encode ( $data, $format )

getEncoder() public méthode

public getEncoder ( $format )

normalize() public méthode

public normalize ( $data, $format = null )

serialize() final public méthode

final public serialize ( $data, $format )

supportsDecoding() public méthode

public supportsDecoding ( $format )

supportsDeserialization() public méthode

public supportsDeserialization ( $format )

supportsEncoding() public méthode

public supportsEncoding ( $format )

supportsSerialization() public méthode

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