1 | <?php |
||
9 | class JsonDefinitionArray implements DefinitionElementInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $name; |
||
15 | /** |
||
16 | * @var DefinitionElementInterface |
||
17 | */ |
||
18 | private $element; |
||
19 | |||
20 | /** |
||
21 | * Constructor |
||
22 | * |
||
23 | * @param string $name Field name |
||
24 | * @param DefinitionElementInterface $element Array item definition |
||
25 | */ |
||
26 | 42 | public function __construct($name, DefinitionElementInterface $element) |
|
31 | |||
32 | /** |
||
33 | * @return DefinitionElementInterface |
||
34 | */ |
||
35 | 14 | public function getElement() |
|
39 | |||
40 | /** |
||
41 | * Returns the name of this field |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | 6 | public function getName() |
|
49 | |||
50 | /** |
||
51 | * Returns the whole definition in array form |
||
52 | * |
||
53 | * @return array Definition |
||
54 | */ |
||
55 | 2 | public function getDefAsArray() |
|
68 | |||
69 | /** |
||
70 | * Returns the field type in a doctrine-understandable way.. |
||
71 | * |
||
72 | * @return string Type |
||
73 | 6 | */ |
|
74 | public function getTypeDoctrine() |
||
78 | |||
79 | /** |
||
80 | * possible overrides. if the element is an anonymous hash, we will always |
||
81 | * default to required => false. |
||
82 | * |
||
83 | 8 | * @return array additional overrides |
|
84 | */ |
||
85 | 8 | private function getHashAnonymousHashRequired() |
|
93 | 6 | ||
94 | /** |
||
95 | 6 | * Returns the field type |
|
96 | * |
||
97 | * @return string Type |
||
98 | */ |
||
99 | public function getType() |
||
103 | |||
104 | /** |
||
105 | * Returns the field type in a serializer-understandable way.. |
||
106 | * |
||
107 | * @return string Type |
||
108 | */ |
||
109 | public function getTypeSerializer() |
||
113 | } |
||
114 |