PHP Interface Symfony\Component\Serializer\SerializerInterface

Author: Jordi Boggiano ([email protected])
Afficher le fichier Open project: pmjones/php-framework-benchmarks Interface Usage Examples

Méthodes publiques

Méthode Description
decode ( string $data, string $format ) : mixed Decodes a string from the given format back into PHP data
denormalize ( mixed $data, string $type, string $format = null ) : mixed Denormalizes data into the given type.
deserialize ( mixed $data, string $type, string $format ) Deserializes data into the given type.
encode ( mixed $data, string $format ) : array | scalar Encodes data into the given format
getEncoder ( $format ) : Symfony\Component\Serializer\Encoder\EncoderInterface Get the encoder for the given format
normalize ( mixed $data, string $format = null ) : array | scalar Normalizes any data into a set of arrays/scalars
serialize ( mixed $data, string $format ) : string Serializes data in the appropriate format
supportsDecoding ( string $format ) : boolean Checks whether the serializer can decode from given format
supportsDeserialization ( string $format ) : boolean Checks whether the serializer can deserialize from given format
supportsEncoding ( string $format ) : boolean Checks whether the serializer can encode to given format
supportsSerialization ( string $format ) : boolean Checks whether the serializer can serialize to given format

Method Details

decode() public méthode

Decodes a string from the given format back into PHP data
public decode ( string $data, string $format ) : mixed
$data string data to decode
$format string format name
Résultat mixed

denormalize() public méthode

Denormalizes data into the given type.
public denormalize ( mixed $data, string $type, string $format = null ) : mixed
$data mixed
$type string
$format string
Résultat mixed

deserialize() public méthode

Deserializes data into the given type.
public deserialize ( mixed $data, string $type, string $format )
$data mixed
$type string
$format string

encode() public méthode

Encodes data into the given format
public encode ( mixed $data, string $format ) : array | scalar
$data mixed data to encode
$format string format name
Résultat array | scalar

getEncoder() public méthode

Get the encoder for the given format
public getEncoder ( $format ) : Symfony\Component\Serializer\Encoder\EncoderInterface
Résultat Symfony\Component\Serializer\Encoder\EncoderInterface

normalize() public méthode

Normalizes any data into a set of arrays/scalars
public normalize ( mixed $data, string $format = null ) : array | scalar
$data mixed data to normalize
$format string format name, present to give the option to normalizers to act differently based on formats
Résultat array | scalar

serialize() public méthode

Serializes data in the appropriate format
public serialize ( mixed $data, string $format ) : string
$data mixed any data
$format string format name
Résultat string

supportsDecoding() public méthode

Checks whether the serializer can decode from given format
public supportsDecoding ( string $format ) : boolean
$format string format name
Résultat boolean

supportsDeserialization() public méthode

Checks whether the serializer can deserialize from given format
public supportsDeserialization ( string $format ) : boolean
$format string format name
Résultat boolean

supportsEncoding() public méthode

Checks whether the serializer can encode to given format
public supportsEncoding ( string $format ) : boolean
$format string format name
Résultat boolean

supportsSerialization() public méthode

Checks whether the serializer can serialize to given format
public supportsSerialization ( string $format ) : boolean
$format string format name
Résultat boolean