| @@ 132-143 (lines=12) @@ | ||
| 129 | * @param array $json |
|
| 130 | * @return ResourceInterface |
|
| 131 | */ |
|
| 132 | public function hydrate(string $class, array $json): ResourceInterface |
|
| 133 | { |
|
| 134 | $fullClassName = implode( |
|
| 135 | '\\', |
|
| 136 | [ |
|
| 137 | $this->options[Options::NAMESPACE], |
|
| 138 | $this->options[Options::NAMESPACE_SUFFIX], |
|
| 139 | $class, |
|
| 140 | ] |
|
| 141 | ); |
|
| 142 | return $this->hydrateFQCN($fullClassName, $json); |
|
| 143 | } |
|
| 144 | ||
| 145 | /** |
|
| 146 | * @param string $class |
|
| @@ 256-267 (lines=12) @@ | ||
| 253 | * @param ResourceInterface $object |
|
| 254 | * @return array |
|
| 255 | */ |
|
| 256 | public function extract(string $class, ResourceInterface $object): array |
|
| 257 | { |
|
| 258 | $fullClassName = implode( |
|
| 259 | '\\', |
|
| 260 | [ |
|
| 261 | $this->options[Options::NAMESPACE], |
|
| 262 | $this->options[Options::NAMESPACE_SUFFIX], |
|
| 263 | $class, |
|
| 264 | ] |
|
| 265 | ); |
|
| 266 | return $this->extractFQCN($fullClassName, $object); |
|
| 267 | } |
|
| 268 | ||
| 269 | /** |
|
| 270 | * Takes a fully qualified class name and extracts the data for that class from the given $object |
|