Loads commands from a PSR-11 container.
- Full name:
\Symfony\Component\Console\CommandLoader\ContainerCommandLoader
- This class implements:
\Symfony\Component\Console\CommandLoader\CommandLoaderInterface
private $container
private $commandMap
public __construct(\Psr\Container\ContainerInterface $container, array $commandMap): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$container |
\Psr\Container\ContainerInterface | |
$commandMap |
array | An array with command names as keys and service ids as values |
Loads a command.
public get(string $name): \Symfony\Component\Console\Command\Command
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string |
Checks if a command exists.
public has(string $name): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string |
public getNames(): string[]