1 | <?php declare(strict_types=1); |
||
16 | class ComplexType |
||
17 | { |
||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $name; |
||
22 | |||
23 | /** |
||
24 | * @var ObjectSchema |
||
25 | */ |
||
26 | private $schema; |
||
27 | |||
28 | /** |
||
29 | * @var ComplexType[] |
||
30 | */ |
||
31 | private $parents = []; |
||
32 | |||
33 | /** |
||
34 | * @var ComplexType[] |
||
35 | */ |
||
36 | private $children = []; |
||
37 | |||
38 | /** |
||
39 | * @var null|string |
||
40 | */ |
||
41 | private $className; |
||
42 | |||
43 | public function __construct(string $name, ObjectSchema $schema, string $className) |
||
49 | |||
50 | /** |
||
51 | * @param ComplexType $child |
||
52 | * |
||
53 | * @return ComplexType |
||
54 | */ |
||
55 | public function addChild(ComplexType $child): ComplexType |
||
60 | |||
61 | /** |
||
62 | * @param ComplexType $parent |
||
63 | * |
||
64 | * @return ComplexType |
||
65 | */ |
||
66 | public function addParent(ComplexType $parent): ComplexType |
||
72 | |||
73 | /** |
||
74 | * @return ComplexType[] |
||
75 | */ |
||
76 | public function getParents(): array |
||
80 | |||
81 | /** |
||
82 | * @return ComplexType[] |
||
83 | */ |
||
84 | public function getChildren(): array |
||
88 | |||
89 | /** |
||
90 | * @return null|string |
||
91 | */ |
||
92 | public function getClassName() |
||
96 | |||
97 | /** |
||
98 | * @return string |
||
99 | */ |
||
100 | public function getName(): string |
||
104 | |||
105 | /** |
||
106 | * @return ObjectSchema |
||
107 | */ |
||
108 | public function getSchema(): ObjectSchema |
||
112 | } |
||
113 |