b2pweb /
bdf-serializer
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Bdf\Serializer\Normalizer; |
||
| 4 | |||
| 5 | use Bdf\Serializer\Exception\UnexpectedValueException; |
||
| 6 | |||
| 7 | /** |
||
| 8 | * Interface NormalizerLoaderInterface |
||
| 9 | */ |
||
| 10 | interface NormalizerLoaderInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Get the object normalizer |
||
| 14 | * |
||
| 15 | * @param class-string<T>|T $className |
||
|
0 ignored issues
–
show
Documentation
Bug
introduced
by
Loading history...
|
|||
| 16 | * |
||
| 17 | * @return NormalizerInterface<T> |
||
| 18 | * |
||
| 19 | * @throws UnexpectedValueException if no normalizer has been found |
||
| 20 | * @template T as object |
||
| 21 | */ |
||
| 22 | public function getNormalizer($className): NormalizerInterface; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Associate a normalizer to a class name |
||
| 26 | * |
||
| 27 | * @param class-string $className |
||
|
0 ignored issues
–
show
|
|||
| 28 | * @param NormalizerInterface $normalizer |
||
| 29 | * |
||
| 30 | * @return $this |
||
| 31 | */ |
||
| 32 | public function associate($className, NormalizerInterface $normalizer); |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Register a normalizer |
||
| 36 | * |
||
| 37 | * @param NormalizerInterface $normalizer |
||
| 38 | * |
||
| 39 | * @return $this |
||
| 40 | */ |
||
| 41 | public function addNormalizer(NormalizerInterface $normalizer); |
||
| 42 | } |
||
| 43 |