1 | <?php |
||
13 | abstract class AbstractComponent implements GenerateableInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var PhpFileElement|PhpClassElement |
||
17 | */ |
||
18 | protected $mainElement; |
||
19 | /** |
||
20 | * @see \WsdlToPhp\PhpGenerator\Component\GenerateableInterface::toString() |
||
21 | * @return string |
||
22 | */ |
||
23 | 12 | public function toString(): string |
|
31 | /** |
||
32 | * @return AbstractElement[]|string[] |
||
33 | */ |
||
34 | abstract public function getElements(): array; |
||
35 | /** |
||
36 | * @throws \InvalidArgumentException |
||
37 | * @param AbstractElement $element |
||
38 | * @return AbstractComponent |
||
39 | */ |
||
40 | 14 | public function setMainElement(AbstractElement $element): AbstractComponent |
|
49 | /** |
||
50 | * @return PhpFileElement|PhpClassElement |
||
51 | */ |
||
52 | 12 | public function getMainElement(): AbstractElement |
|
56 | /** |
||
57 | * @throws \InvalidArgumentException |
||
58 | * @param string|AbstractElement $element |
||
59 | * @return string |
||
60 | */ |
||
61 | 12 | protected function getElementString($element): string |
|
71 | /** |
||
72 | * @param PhpConstantElement $constant |
||
73 | * @return AbstractComponent |
||
74 | */ |
||
75 | 8 | public function addConstantElement(PhpConstantElement $constant): AbstractComponent |
|
83 | /** |
||
84 | * @see \WsdlToPhp\PhpGenerator\Element\PhpConstant::__construct() |
||
85 | * @param string $name |
||
86 | * @param mixed $value |
||
87 | * @param PhpClassElement $class |
||
88 | * @return AbstractComponent |
||
89 | */ |
||
90 | 8 | public function addConstant($name, $value = null, PhpClassElement $class = null): AbstractComponent |
|
94 | /** |
||
95 | * @param PhpAnnotationBlockElement $annotationBlock |
||
96 | * @return AbstractComponent |
||
97 | */ |
||
98 | 8 | public function addAnnotationBlockElement(PhpAnnotationBlockElement $annotationBlock): AbstractComponent |
|
103 | /** |
||
104 | * @see \WsdlToPhp\PhpGenerator\Element\PhpAnnotationBlock::__construct() |
||
105 | * @param array|string|PhpAnnotationElement $annotations |
||
106 | * @return AbstractComponent |
||
107 | */ |
||
108 | 8 | public function addAnnotationBlock($annotations): AbstractComponent |
|
114 | } |
||
115 |