WritableContainerLoader
Implements WritableLoaderInterfacePSR-11 compatible writable command loader.
final
| since |
4.0.0 |
|---|---|
| package |
Joomla CMS |
Methods
__construct
Constructor.
__construct(\Psr\Container\ContainerInterface container, mixed||string|int commandMap) :
| since |
4.0.0 |
|---|
Arguments
- container
ContainerInterfaceA container from which to load command services.- commandMap
array<string|int, mixed>An array with command names as keys and service IDs as values.
Response
mixed
add
Adds a command to the loader.
add( commandName, className) :
| since |
4.0.0 |
|---|
Arguments
- commandName
stringThe name of the command to load.- className
stringThe fully qualified class name of the command.
Response
void
get
Loads a command.
get( name) : \Joomla\Console\Command\AbstractCommand
| since |
4.0.0 |
|---|---|
| throws |
|
Arguments
- name
stringThe command to load.
Response
AbstractCommand
getNames
Get the names of the registered commands.
getNames() : string||string|int
| since |
4.0.0 |
|---|
Response
array<string|int, string>
has
Checks if a command exists.
has( name) :
| since |
4.0.0 |
|---|
Arguments
- name
stringThe command to check.
Response
bool
Properties
container
The service container.
| since |
4.0.0 |
|---|
Type(s)
ContainerInterface
commandMap
The command name to service ID map.
| since |
4.0.0 |
|---|
Type(s)
array<string|int, string>