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