1 | <?php |
||
7 | class Struct extends AbstractModel |
||
8 | { |
||
9 | /** |
||
10 | * @see \WsdlToPhp\PackageGenerator\Container\Model\Model::objectClass() |
||
11 | * @return string |
||
12 | */ |
||
13 | 660 | protected function objectClass() |
|
17 | /** |
||
18 | * @param string $name |
||
19 | * @return Model|null |
||
20 | */ |
||
21 | 665 | public function getStructByName($name) |
|
25 | /** |
||
26 | * @param string $name |
||
27 | * @param string $type |
||
28 | * @return Model|null |
||
29 | */ |
||
30 | 10 | public function getStructByNameAndType($name, $type) |
|
34 | /** |
||
35 | * Adds a virtual struct |
||
36 | * @param string $structName the original struct name |
||
37 | * @return Struct |
||
38 | */ |
||
39 | 245 | public function addVirtualStruct($structName) |
|
43 | /** |
||
44 | * Adds type to structs |
||
45 | * @param string $structName the original struct name |
||
46 | * @param bool $isStruct whether the Struct has to be generated or not |
||
47 | * @return Struct |
||
48 | */ |
||
49 | 255 | public function addStruct($structName, $isStruct = true) |
|
56 | /** |
||
57 | * Adds type to structs and its attribute |
||
58 | * @param string $structName the original struct name |
||
59 | * @param string $attributeName the attribute name |
||
60 | * @param string $attributeType the attribute type |
||
61 | * @return Struct |
||
62 | */ |
||
63 | 255 | public function addStructWithAttribute($structName, $attributeName, $attributeType) |
|
71 | /** |
||
72 | * Adds a union struct |
||
73 | * @param string $structName |
||
74 | * @param string[] $types |
||
75 | * @return Struct |
||
76 | */ |
||
77 | 20 | public function addUnionStruct($structName, $types) |
|
85 | /** |
||
86 | * @see \WsdlToPhp\PackageGenerator\Model\AbstractModel::get() |
||
87 | * @param string $value |
||
88 | * @return Model|null |
||
89 | */ |
||
90 | 665 | public function get($value) |
|
94 | /** |
||
95 | * @see parent::get() |
||
96 | * @param string $value |
||
97 | * @param string $type |
||
98 | * @return mixed |
||
99 | */ |
||
100 | 10 | public function getByType($value, $type) |
|
111 | /** |
||
112 | * @param $object |
||
113 | * @param $type |
||
114 | * @return string |
||
115 | */ |
||
116 | 215 | public function getObjectWithTypeKey($object, $type) |
|
120 | /** |
||
121 | * The key must not conflict with possible key values |
||
122 | * @param $name |
||
123 | * @param $type |
||
124 | * @return string |
||
125 | */ |
||
126 | 220 | public function getTypeKey($name, $type) |
|
130 | /** |
||
131 | * By overriding this method, we ensure that each time a new object is stored as usual, it is also stored with our new key. |
||
132 | * Nonetheless, it is stored only if its type is known. |
||
133 | * @param Model $object |
||
134 | * @return Struct |
||
135 | */ |
||
136 | 660 | public function add($object) |
|
145 | } |
||
146 |