| @@ 121-132 (lines=12) @@ | ||
| 118 | * @param array $json |
|
| 119 | * @return ResourceInterface |
|
| 120 | */ |
|
| 121 | public function hydrate(string $class, array $json): ResourceInterface |
|
| 122 | { |
|
| 123 | $fullClassName = \implode( |
|
| 124 | '\\', |
|
| 125 | [ |
|
| 126 | $this->options[Options::NAMESPACE], |
|
| 127 | $this->options[Options::NAMESPACE_SUFFIX], |
|
| 128 | $class, |
|
| 129 | ] |
|
| 130 | ); |
|
| 131 | ||
| 132 | return $this->hydrateFQCN($fullClassName, $json); |
|
| 133 | } |
|
| 134 | ||
| 135 | /** |
|
| @@ 160-171 (lines=12) @@ | ||
| 157 | * @param ResourceInterface $object |
|
| 158 | * @return array |
|
| 159 | */ |
|
| 160 | public function extract(string $class, ResourceInterface $object): array |
|
| 161 | { |
|
| 162 | $fullClassName = \implode( |
|
| 163 | '\\', |
|
| 164 | [ |
|
| 165 | $this->options[Options::NAMESPACE], |
|
| 166 | $this->options[Options::NAMESPACE_SUFFIX], |
|
| 167 | $class, |
|
| 168 | ] |
|
| 169 | ); |
|
| 170 | ||
| 171 | return $this->extractFQCN($fullClassName, $object); |
|
| 172 | } |
|
| 173 | ||
| 174 | /** |
|