W3cubDocs

/Symfony 4.1

FactoryCommandLoader

class FactoryCommandLoader implements CommandLoaderInterface

A simple command loader using factories to instantiate commands lazily.

Methods

__construct(array $factories)
bool has(string $name)

Checks if a command exists.

Command get(string $name)

Loads a command.

string[] getNames()

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

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Console/CommandLoader/FactoryCommandLoader.html