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' ) { |
|
36 | |||
37 | protected function assertCanDeserialize( $serialization ) { |
||
46 | |||
47 | 3 | public function isDeserializerFor( $serialization ) { |
|
50 | |||
51 | 2 | private function hasCorrectObjectType( array $serialization ) { |
|
54 | |||
55 | 3 | private function hasObjectType( $serialization ) { |
|
59 | |||
60 | /** |
||
61 | * @deprecated since 4.0, just do your own "if ( array_key_exists( … ) )" or |
||
62 | * "if ( isset( … ) )" instead |
||
63 | * |
||
64 | * @param array $array |
||
65 | * @param string $attributeName |
||
66 | */ |
||
67 | protected function requireAttribute( array $array, $attributeName ) { |
||
74 | |||
75 | /** |
||
76 | * @deprecated since 4.0, just do your own "if ( is_array( … ) )" instead |
||
77 | * |
||
78 | * @param array $array |
||
79 | * @param string $attributeName |
||
80 | */ |
||
81 | protected function assertAttributeIsArray( array $array, $attributeName ) { |
||
84 | |||
85 | /** |
||
86 | * @deprecated since 4.0, just do your own "if ( is_string( … ) )" and such instead |
||
87 | * |
||
88 | * @param array $array |
||
89 | * @param string $attributeName |
||
90 | * @param string $internalType |
||
91 | */ |
||
92 | protected function assertAttributeInternalType( array $array, $attributeName, $internalType ) { |
||
101 | |||
102 | } |
||
103 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.