class ContainerCommandLoader implements CommandLoaderInterface

Loads commands from a PSR-11 container.

Methods

__construct(ContainerInterface $container, array $commandMap)

No description

get(string $name)

Loads a command.

bool
has(string $name)

Checks if a command exists.

string[]
getNames()

No description

Details

at line line 22
__construct(ContainerInterface $container, array $commandMap)

Parameters

ContainerInterface $container A container from which to load command services
array $commandMap An array with command names as keys and service ids as values

at line line 31
Command get(string $name)

Loads a command.

Parameters

string $name

Return Value

Command

Exceptions

CommandNotFoundException

at line line 43
bool has(string $name)

Checks if a command exists.

Parameters

string $name

Return Value

bool

at line line 51
string[] getNames()

Return Value

string[] All registered command names