1 | <?php |
||
23 | final class TimestampNormalizer implements DenormalizerInterface, NormalizerInterface |
||
24 | { |
||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | 1 | public function denormalize($data, $class, $format = null, array $context = array()) |
|
29 | { |
||
30 | 1 | return new \DateTime($data); |
|
31 | } |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | 50 | public function supportsDenormalization($data, $type, $format = null) |
|
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | 1 | public function normalize($object, $format = null, array $context = array()) |
|
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | 49 | public function supportsNormalization($data, $format = null) |
|
60 | } |
||
61 |