PHP Interface Symfony\Component\Serializer\Normalizer\NormalizerInterface

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

Public Methods

Method Description
normalize ( object $object, string $format = null ) : array | scalar Normalizes an object into a set of arrays/scalars
supportsNormalization ( mixed $data, string $format = null ) : boolean Checks whether the given class is supported for normalization by this normalizer

Method Details

normalize() public method

Normalizes an object into a set of arrays/scalars
public normalize ( object $object, string $format = null ) : array | scalar
$object object object to normalize
$format string format the normalization result will be encoded as
return array | scalar

supportsNormalization() public method

Checks whether the given class is supported for normalization by this normalizer
public supportsNormalization ( mixed $data, string $format = null ) : boolean
$data mixed Data to normalize.
$format string The format being (de-)serialized from or into.
return boolean