class FactoryCommandLoader implements CommandLoaderInterface

A simple command loader using factories to instantiate commands lazily.

Methods

__construct(array $factories)

No description

bool
has(string $name)

Checks if a command exists.

get(string $name)

Loads a command.

string[]
getNames()

No description

Details

__construct(array $factories)

Parameters

array $factories Indexed by command names

bool has(string $name)

Checks if a command exists.

Parameters

string $name

Return Value

bool

Command get(string $name)

Loads a command.

Parameters

string $name

Return Value

Command

Exceptions

CommandNotFoundException

string[] getNames()

Return Value

string[] All registered command names