Normalizes an object into a set of arrays/scalars.
object $object: Object to normalize.
string $format: Format the normalization result will be encoded as.
array An array containing a normalized representation of $object, appropriate for encoding to the requested format.
Overrides NormalizerInterface::normalize
public function normalize($object, $format = NULL, array $context = array()) {
$normalized = (array) $object;
// Add identifying value that can be used to verify that the expected
// normalizer was invoked.
$normalized['normalized_by'] = 'SerializationTestNormalizer';
return $normalized;
}