Skip to content

Latest commit

 

History

History
152 lines (54 loc) · 1.3 KB

ContainerCommandLoader.md

File metadata and controls

152 lines (54 loc) · 1.3 KB

ContainerCommandLoader

Loads commands from a PSR-11 container.

Properties

container

private $container

commandMap

private $commandMap

Methods

__construct

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

get

Loads a command.

public get(string $name): \Symfony\Component\Console\Command\Command

Parameters:

Parameter Type Description
$name string

has

Checks if a command exists.

public has(string $name): bool

Parameters:

Parameter Type Description
$name string

getNames

public getNames(): string[]