1 | <?php |
||
24 | final class ActorNormalizer extends Normalizer |
||
25 | { |
||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | */ |
||
29 | 10 | public function normalize($object, $format = null, array $context = array()) |
|
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | 11 | public function supportsNormalization($data, $format = null) |
|
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | 12 | public function denormalize($data, $class, $format = null, array $context = array()) |
|
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | 13 | public function supportsDenormalization($data, $type, $format = null) |
|
88 | |||
89 | 10 | private function normalizeInverseFunctionalIdentifier(InverseFunctionalIdentifier $iri = null, &$data) |
|
90 | { |
||
91 | 10 | if (null === $iri) { |
|
92 | 1 | return; |
|
93 | } |
||
94 | |||
95 | 10 | if (null !== $mbox = $iri->getMbox()) { |
|
96 | 9 | $data['mbox'] = $mbox; |
|
97 | } |
||
98 | |||
99 | 10 | if (null !== $mboxSha1Sum = $iri->getMboxSha1Sum()) { |
|
100 | $data['mbox_sha1sum'] = $mboxSha1Sum; |
||
101 | } |
||
102 | |||
103 | 10 | if (null !== $openId = $iri->getOpenId()) { |
|
104 | 1 | $data['openid'] = $openId; |
|
105 | } |
||
106 | |||
107 | 10 | if (null !== $account = $iri->getAccount()) { |
|
108 | 3 | $data['account'] = $this->normalizeAttribute($account); |
|
109 | } |
||
110 | 10 | } |
|
111 | |||
112 | 12 | private function denormalizeInverseFunctionalIdentifier($data, $format = null, array $context = array()) |
|
130 | |||
131 | 3 | private function denormalizeAccount($data, $format = null, array $context = array()) |
|
139 | |||
140 | 2 | private function denormalizeGroup(InverseFunctionalIdentifier $iri = null, $name, $data, $format = null, array $context = array()) |
|
152 | } |
||
153 |