1 | <?php declare(strict_types = 1); |
||
13 | class MethodGenerator extends FunctionGenerator |
||
14 | { |
||
15 | /** @var bool Flag that method is static */ |
||
16 | protected $isStatic = false; |
||
17 | |||
18 | /** @var bool Flag that method is abstract */ |
||
19 | protected $isAbstract = false; |
||
20 | |||
21 | /** @var bool Flag that method is final */ |
||
22 | protected $isFinal = false; |
||
23 | |||
24 | /** @var string Method visibility */ |
||
25 | protected $visibility = ClassGenerator::VISIBILITY_PUBLIC; |
||
26 | |||
27 | /** |
||
28 | * Build function definition. |
||
29 | * |
||
30 | * @return string Function definition |
||
31 | */ |
||
32 | protected function buildDefinition() |
||
39 | |||
40 | /** |
||
41 | * Set method to be static. |
||
42 | * |
||
43 | * @return MethodGenerator |
||
44 | */ |
||
45 | public function defStatic() : MethodGenerator |
||
51 | |||
52 | /** |
||
53 | * Set method to be final. |
||
54 | * |
||
55 | * @return MethodGenerator |
||
56 | */ |
||
57 | public function defFinal() : MethodGenerator |
||
67 | |||
68 | /** |
||
69 | * Set method to be abstract. |
||
70 | * |
||
71 | * @return MethodGenerator |
||
72 | */ |
||
73 | public function defAbstract() : MethodGenerator |
||
83 | } |
||
84 |