1 | <?php declare(strict_types = 1); |
||
17 | class MetadataBuilder |
||
18 | { |
||
19 | /** Controller classes scope name */ |
||
20 | const SCOPE_CONTROLLER = 'controllers'; |
||
21 | |||
22 | /** Service classes scope name */ |
||
23 | const SCOPE_SERVICES = 'services'; |
||
24 | |||
25 | /** @var string[] Collection of available container scopes */ |
||
26 | protected $scopes = [ |
||
27 | self::SCOPE_CONTROLLER => [], |
||
28 | self::SCOPE_SERVICES => [] |
||
29 | ]; |
||
30 | |||
31 | /** @var ClassMetadata[string] Collection of classes metadata */ |
||
32 | protected $classMetadata = []; |
||
33 | |||
34 | /** @var FileManagerInterface */ |
||
35 | protected $fileManger; |
||
36 | |||
37 | /** @var Resolver */ |
||
38 | protected $classResolver; |
||
39 | |||
40 | /** |
||
41 | * Container constructor. |
||
42 | * |
||
43 | * @param FileManagerInterface $fileManger |
||
44 | */ |
||
45 | 4 | public function __construct(FileManagerInterface $fileManger, Resolver $classResolver) |
|
50 | |||
51 | /** |
||
52 | * Load classes from paths. |
||
53 | * |
||
54 | * @param array $paths Paths for importing |
||
55 | * |
||
56 | * @return $this |
||
57 | */ |
||
58 | 1 | public function loadFromPaths(array $paths) |
|
68 | |||
69 | /** |
||
70 | * Load classes from class names collection. |
||
71 | * |
||
72 | * @param string[] $classes Collection of class names for resolving |
||
73 | * |
||
74 | * @return $this |
||
75 | */ |
||
76 | 3 | public function loadFromClassNames(array $classes) |
|
90 | |||
91 | /** |
||
92 | * Find class names defined in PHP code. |
||
93 | * |
||
94 | * @param string $php PHP code for scanning |
||
95 | * |
||
96 | * @return string[] Collection of found class names in php code |
||
97 | */ |
||
98 | 2 | protected function getDefinedClasses($php) : array |
|
118 | |||
119 | /** |
||
120 | * Load classes from PHP code. |
||
121 | * |
||
122 | * @param string $php PHP code |
||
123 | * |
||
124 | * @return $this |
||
125 | */ |
||
126 | 1 | public function loadFromCode($php) |
|
133 | |||
134 | /** |
||
135 | * Build container class. |
||
136 | */ |
||
137 | 1 | public function build($containerClass) |
|
141 | } |
||
142 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.