|
@@ 26-35 (lines=10) @@
|
| 23 |
|
$this->cache = $cache; |
| 24 |
|
} |
| 25 |
|
|
| 26 |
|
public function normalize($propertyName, string $class = null, string $format = null, array $context = []) |
| 27 |
|
{ |
| 28 |
|
$fields = $this->cache->fetch(DocumentParser::OBJ_CACHED_FIELDS); |
| 29 |
|
|
| 30 |
|
if (isset($fields[$class])) { |
| 31 |
|
return $fields[$class][$propertyName] ?? $propertyName; |
| 32 |
|
} |
| 33 |
|
|
| 34 |
|
return $propertyName; |
| 35 |
|
} |
| 36 |
|
|
| 37 |
|
public function denormalize($propertyName, string $class = null, string $format = null, array $context = []) |
| 38 |
|
{ |
|
@@ 37-46 (lines=10) @@
|
| 34 |
|
return $propertyName; |
| 35 |
|
} |
| 36 |
|
|
| 37 |
|
public function denormalize($propertyName, string $class = null, string $format = null, array $context = []) |
| 38 |
|
{ |
| 39 |
|
$fields = $this->cache->fetch(DocumentParser::ARRAY_CACHED_FIELDS); |
| 40 |
|
|
| 41 |
|
if (isset($fields[$class])) { |
| 42 |
|
return $fields[$class][$propertyName] ?? $propertyName; |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
return $propertyName; |
| 46 |
|
} |
| 47 |
|
} |
| 48 |
|
|