DateIntervalNormalizer
class DateIntervalNormalizer implements NormalizerInterface, DenormalizerInterface, CacheableSupportsMethodInterface
Normalizes an instance of {see \DateInterval} to an interval string.
Denormalizes an interval string to an instance of {see \DateInterval}.
Constants
FORMAT_KEY |
|
Methods
__construct(array $defaultContext = array())
No description
array|string|int|float|bool
normalize(mixed $object, string $format = null, array $context = array())
Normalizes an object into a set of arrays/scalars.
bool
supportsNormalization(mixed $data, string $format = null)
Checks whether the given class is supported for normalization by this normalizer.
bool
hasCacheableSupportsMethod()
No description
object
denormalize(mixed $data, string $class, string $format = null, array $context = array())
Denormalizes data back into an object of the given class.
bool
supportsDenormalization(mixed $data, string $type, string $format = null)
Checks whether the given class is supported for denormalization by this normalizer.
Details
array|string|int|float|bool
normalize(mixed $object, string $format = null, array $context = array())
Normalizes an object into a set of arrays/scalars.
bool
supportsNormalization(mixed $data, string $format = null)
Checks whether the given class is supported for normalization by this normalizer.