class ContainerCommandLoader implements CommandLoaderInterface (View source)

Properties

protected ContainerInterface $container

The container instance.

protected array $commandMap

A map of command names to classes.

Methods

void
__construct(ContainerInterface $container, array $commandMap)

Create a new command loader instance.

Command
get(string $name)

Resolve a command from the container.

bool
has(string $name)

Determines if a command exists.

array
getNames()

Get the command names.

Details

void __construct(ContainerInterface $container, array $commandMap)

Create a new command loader instance.

Parameters

ContainerInterface $container
array $commandMap

Return Value

void

Command get(string $name)

Resolve a command from the container.

Parameters

string $name

Return Value

Command

Exceptions

CommandNotFoundException

bool has(string $name)

Determines if a command exists.

Parameters

string $name

Return Value

bool

array getNames()

Get the command names.

Return Value

array