1 | <?php |
||
21 | class Installer extends Command |
||
22 | { |
||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | */ |
||
26 | protected $signature = 'app:install {component? : The component name}'; |
||
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | protected $description = 'Installs a new component'; |
||
32 | |||
33 | /** |
||
34 | * The list of components installers. |
||
35 | * |
||
36 | * @var array |
||
37 | */ |
||
38 | protected $components = [ |
||
39 | 'database' => Components\Database\Installer::class, |
||
40 | 'dotenv' => Components\Dotenv\Installer::class, |
||
41 | 'log' => Components\Log\Installer::class, |
||
42 | ]; |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | 6 | public function handle(): void |
|
69 | } |
||
70 |
If you implement
__call
and 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
__call
is implemented by a parent class and only the child class knows which methods exist: