1 | <?php |
||
7 | class PhpMethod extends PhpFunction |
||
8 | { |
||
9 | /** |
||
10 | * @var bool |
||
11 | */ |
||
12 | protected $final; |
||
13 | /** |
||
14 | * @var bool |
||
15 | */ |
||
16 | protected $static; |
||
17 | /** |
||
18 | * @var bool |
||
19 | */ |
||
20 | protected $abstract; |
||
21 | /** |
||
22 | * @var bool |
||
23 | */ |
||
24 | protected $hasBody; |
||
25 | /** |
||
26 | * @param string $name |
||
27 | * @param string[]|PhpFunctionParameter[] $parameters |
||
28 | * @param string $access |
||
29 | * @param bool $abstract |
||
30 | * @param bool $static |
||
31 | * @param bool $final |
||
32 | * @param bool $hasBody |
||
33 | */ |
||
34 | 58 | public function __construct(string $name, array $parameters = [], string $access = parent::ACCESS_PUBLIC, bool $abstract = false, bool $static = false, bool $final = false, bool $hasBody = true) |
|
44 | /** |
||
45 | * @param bool $abstract |
||
46 | * @return PhpMethod |
||
47 | */ |
||
48 | 58 | public function setAbstract(bool $abstract): PhpMethod |
|
53 | /** |
||
54 | * @return bool |
||
55 | */ |
||
56 | 40 | public function getAbstract(): bool |
|
60 | /** |
||
61 | * @return string |
||
62 | */ |
||
63 | 40 | protected function getPhpAbstract(): string |
|
67 | /** |
||
68 | * @param bool $final |
||
69 | * @return PhpMethod |
||
70 | */ |
||
71 | 58 | public function setFinal(bool $final): PhpMethod |
|
76 | /** |
||
77 | * @return bool |
||
78 | */ |
||
79 | 40 | public function getFinal(): bool |
|
83 | /** |
||
84 | * @return string |
||
85 | */ |
||
86 | 40 | protected function getPhpFinal(): string |
|
90 | /** |
||
91 | * @param bool $static |
||
92 | * @return PhpMethod |
||
93 | */ |
||
94 | 58 | public function setStatic(bool $static): PhpMethod |
|
99 | /** |
||
100 | * @return bool |
||
101 | */ |
||
102 | 40 | public function getStatic(): bool |
|
106 | /** |
||
107 | * @return string |
||
108 | */ |
||
109 | 40 | protected function getPhpStatic(): string |
|
113 | /** |
||
114 | * @param bool $hasBody |
||
115 | * @return PhpMethod |
||
116 | */ |
||
117 | 58 | public function setHasBody(bool $hasBody): PhpMethod |
|
122 | /** |
||
123 | * @return bool |
||
124 | */ |
||
125 | 48 | public function getHasBody(): bool |
|
129 | /** |
||
130 | * @return string |
||
131 | */ |
||
132 | 40 | protected function getPhpDeclarationEnd(): string |
|
136 | /** |
||
137 | * @see \WsdlToPhp\PhpGenerator\Element\AbstractAccessRestrictedElement::getPhpDeclaration() |
||
138 | * @return string |
||
139 | */ |
||
140 | 40 | public function getPhpDeclaration(): string |
|
144 | /** |
||
145 | * indicates if the current element has accessibility constraint |
||
146 | * @return bool |
||
147 | */ |
||
148 | 40 | public function hasAccessibilityConstraint(): bool |
|
152 | /** |
||
153 | * Allows to generate content before children content is generated |
||
154 | * @param int $indentation |
||
155 | * @return string |
||
156 | */ |
||
157 | 8 | public function getLineBeforeChildren(int $indentation = null): string |
|
164 | /** |
||
165 | * Allows to generate content after children content is generated |
||
166 | * @param int $indentation |
||
167 | * @return string |
||
168 | */ |
||
169 | 8 | public function getLineAfterChildren(int $indentation = null): string |
|
176 | /** |
||
177 | * @see \WsdlToPhp\PhpGenerator\Element\AbstractElement::getChildren() |
||
178 | * @return array |
||
179 | */ |
||
180 | 28 | public function getChildren(): array |
|
187 | /** |
||
188 | * Allows to indicate that children are contained by brackets, |
||
189 | * in the case the method returns true, getBracketBeforeChildren |
||
190 | * is called instead of getLineBeforeChildren and getBracketAfterChildren |
||
191 | * is called instead of getLineAfterChildren, but be aware that these methods |
||
192 | * call the two others |
||
193 | * @return bool |
||
194 | */ |
||
195 | 24 | public function useBracketsForChildren(): bool |
|
199 | } |
||
200 |