1 | <?php declare(strict_types = 1); |
||
18 | class MethodDefinition extends AbstractDefinition implements MethodBuilderInterface |
||
19 | { |
||
20 | /** @var string Method name */ |
||
21 | protected $methodName; |
||
22 | /** @var ParameterDefinition[] Collection of parameter collection */ |
||
23 | protected $parametersCollection = []; |
||
24 | /** @var int Method modifiers */ |
||
25 | protected $modifiers = 0; |
||
26 | /** @var bool Flag that method is public */ |
||
27 | protected $isPublic = false; |
||
28 | |||
29 | /** |
||
30 | * Define arguments |
||
31 | * |
||
32 | * @param string $parameterName |
||
33 | * @return ParameterBuilderInterface |
||
34 | * @throws ParameterDefinitionAlreadyExistsException |
||
35 | */ |
||
36 | 13 | public function defineParameter($parameterName): ParameterBuilderInterface |
|
49 | |||
50 | /** |
||
51 | * @return string |
||
52 | */ |
||
53 | 2 | public function getMethodName(): string |
|
57 | |||
58 | /** |
||
59 | * @return boolean |
||
60 | */ |
||
61 | 3 | public function isPublic(): bool |
|
65 | |||
66 | /** |
||
67 | * @param boolean $isPublic |
||
68 | * @return MethodDefinition |
||
69 | */ |
||
70 | 6 | public function setIsPublic(bool $isPublic): MethodDefinition |
|
76 | |||
77 | /** |
||
78 | * @param string $methodName |
||
79 | * @return MethodDefinition |
||
80 | */ |
||
81 | 16 | public function setMethodName(string $methodName): MethodDefinition |
|
87 | |||
88 | /** |
||
89 | * @return int |
||
90 | */ |
||
91 | 1 | public function getModifiers(): int |
|
95 | |||
96 | /** |
||
97 | * @param int $modifiers |
||
98 | * @return MethodDefinition |
||
99 | */ |
||
100 | 6 | public function setModifiers(int $modifiers): MethodDefinition |
|
106 | |||
107 | /** |
||
108 | * @return ParameterDefinition[] |
||
109 | */ |
||
110 | 8 | public function getParametersCollection(): array |
|
114 | } |
||
115 |