1 | <?php declare(strict_types = 1); |
||
21 | class MethodDefinition extends AbstractDefinition implements MethodBuilderInterface |
||
22 | { |
||
23 | /** @var string Method name */ |
||
24 | protected $methodName; |
||
25 | /** @var ParameterDefinition[] Collection of parameter collection */ |
||
26 | protected $parametersCollection = []; |
||
27 | /** @var int Method modifiers */ |
||
28 | public $modifiers = 0; |
||
29 | /** @var bool Flag that method is public */ |
||
30 | public $isPublic = false; |
||
31 | |||
32 | /** |
||
33 | * Define arguments |
||
34 | * |
||
35 | * @param string $parameterName |
||
36 | * @return ParameterBuilderInterface |
||
37 | * @throws ParameterDefinitionAlreadyExistsException |
||
38 | */ |
||
39 | 2 | public function defineParameter($parameterName): ParameterBuilderInterface |
|
52 | |||
53 | /** |
||
54 | * Resolve method metadata |
||
55 | * |
||
56 | * @param ClassMetadata $classMetadata |
||
57 | * @return MethodMetadata |
||
58 | * @throws ReferenceNotImplementsException |
||
59 | */ |
||
60 | public function toMethodMetadata(ClassMetadata $classMetadata): MethodMetadata |
||
67 | |||
68 | /** |
||
69 | * @return string |
||
70 | */ |
||
71 | public function getMethodName(): string |
||
75 | |||
76 | /** |
||
77 | * @return boolean |
||
78 | */ |
||
79 | public function getIsPublic(): bool |
||
83 | |||
84 | /** |
||
85 | * @param boolean $isPublic |
||
86 | * @return MethodDefinition |
||
87 | */ |
||
88 | public function setIsPublic(bool $isPublic): MethodDefinition |
||
94 | |||
95 | /** |
||
96 | * @param string $methodName |
||
97 | * @return MethodDefinition |
||
98 | */ |
||
99 | 4 | public function setMethodName(string $methodName): MethodDefinition |
|
105 | |||
106 | /** |
||
107 | * @return int |
||
108 | */ |
||
109 | public function getModifiers(): int |
||
113 | |||
114 | /** |
||
115 | * @param int $modifiers |
||
116 | * @return MethodDefinition |
||
117 | */ |
||
118 | public function setModifiers(int $modifiers): MethodDefinition |
||
124 | } |
||
125 |