A simple command loader using factories to instantiate commands lazily.
- Full name:
\Symfony\Component\Console\CommandLoader\FactoryCommandLoader
- This class implements:
\Symfony\Component\Console\CommandLoader\CommandLoaderInterface
private $factories
public __construct(callable[] $factories): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$factories |
callable[] | Indexed by command names |
Checks if a command exists.
public has(string $name): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string |
Loads a command.
public get(string $name): \Symfony\Component\Console\Command\Command
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string |
public getNames(): string[]