| 1 | <?php |
||
| 5 | class ComposerLoader extends AbstractSystem |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var \Composer\Autoload\ClassLoader|null $loader Composer auto-loader |
||
| 9 | */ |
||
| 10 | protected $loader; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * {@inheritdoc} |
||
| 14 | * |
||
| 15 | * @return \Composer\Autoload\ClassLoader|null |
||
| 16 | */ |
||
| 17 | public function __invoke() |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Getter accessor to property loader |
||
| 24 | * |
||
| 25 | * @return \Composer\Autoload\ClassLoader|null |
||
| 26 | */ |
||
| 27 | public function getLoader() |
||
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritdoc} |
||
| 34 | * Define loader property and add all namespaces |
||
| 35 | */ |
||
| 36 | public function init() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Return the path to the vendor directory |
||
| 49 | * |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | protected function obtainVendorDir() |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Add namespaces used by a BFW Application to composer |
||
| 62 | * |
||
| 63 | * @return void |
||
| 64 | */ |
||
| 65 | protected function addComposerNamespaces() |
||
| 71 | } |
||
| 72 |
If you implement
__calland you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__callis implemented by a parent class and only the child class knows which methods exist: