1 | <?php |
||
10 | class Builder |
||
11 | extends \ReflectionClass |
||
12 | { |
||
13 | /** |
||
14 | * @var array|self[] |
||
15 | */ |
||
16 | protected static $class = []; |
||
17 | |||
18 | /** |
||
19 | * @var \ReflectionMethod |
||
20 | */ |
||
21 | protected $constructor; |
||
22 | |||
23 | /** |
||
24 | * @var \ReflectionParameter[] |
||
25 | */ |
||
26 | protected $params; |
||
27 | |||
28 | /** |
||
29 | * @param $name |
||
30 | * @param array $args |
||
31 | * @param callable $callback |
||
32 | * @return object |
||
33 | */ |
||
34 | static function create($name, array $args, callable $callback) |
||
76 | |||
77 | /** |
||
78 | * @return bool|\ReflectionMethod |
||
79 | */ |
||
80 | protected function constructor() |
||
84 | |||
85 | /** |
||
86 | * @param \ReflectionMethod|null $method |
||
87 | * @return array|\ReflectionParameter[] |
||
88 | */ |
||
89 | protected function constructorParams($method) |
||
93 | |||
94 | /** |
||
95 | * @return \ReflectionParameter[] |
||
96 | */ |
||
97 | protected function params() |
||
101 | |||
102 | /** |
||
103 | * @param $name |
||
104 | * @return self |
||
105 | */ |
||
106 | static function reflectionClass($name) |
||
110 | } |
||
111 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.