| 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 |
||
| 71 | |||
| 72 | /** |
||
| 73 | * @return ComplexType[] |
||
| 74 | */ |
||
| 75 | public function getParents(): array |
||
| 79 | |||
| 80 | /** |
||
| 81 | * @return ComplexType[] |
||
| 82 | */ |
||
| 83 | public function getChildren(): array |
||
| 87 | |||
| 88 | /** |
||
| 89 | * @return null|string |
||
| 90 | */ |
||
| 91 | public function getClassName() |
||
| 95 | |||
| 96 | /** |
||
| 97 | * @return string |
||
| 98 | */ |
||
| 99 | public function getName(): string |
||
| 103 | |||
| 104 | /** |
||
| 105 | * @return ObjectSchema |
||
| 106 | */ |
||
| 107 | public function getSchema(): ObjectSchema |
||
| 111 | } |
||
| 112 |