1 | <?php |
||
16 | abstract class TypedObjectDeserializer implements DispatchableDeserializer { |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $objectType; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $typeKey; |
||
27 | |||
28 | /** |
||
29 | * @param string $objectType |
||
30 | * @param string $typeKey |
||
31 | */ |
||
32 | 3 | public function __construct( $objectType, $typeKey = 'objectType' ) { |
|
37 | |||
38 | protected function assertCanDeserialize( $serialization ) { |
||
47 | |||
48 | 3 | public function isDeserializerFor( $serialization ) { |
|
51 | |||
52 | 2 | private function hasCorrectObjectType( $serialization ) { |
|
55 | |||
56 | 3 | private function hasObjectType( $serialization ) { |
|
60 | |||
61 | protected function requireAttribute( array $array, $attributeName ) { |
||
68 | |||
69 | protected function assertAttributeIsArray( array $array, $attributeName ) { |
||
72 | |||
73 | protected function assertAttributeInternalType( array $array, $attributeName, $internalType ) { |
||
82 | |||
83 | } |
||
84 |