ContainerCommandLoader
in package
implements
CommandLoaderInterface
Loads commands from a PSR-11 container.
Tags
Interfaces, Classes and Traits
Table of Contents
- $commandMap : mixed
- $container : mixed
- __construct() : mixed
- get() : Command
- Loads a command.
- getNames() : array<string|int, string>
- has() : bool
- Checks if a command exists.
Properties
$commandMap
private
mixed
$commandMap
$container
private
mixed
$container
Methods
__construct()
public
__construct(ContainerInterface $container, array<string|int, mixed> $commandMap) : mixed
Parameters
- $container : ContainerInterface
- $commandMap : array<string|int, mixed>
-
An array with command names as keys and service ids as values
Return values
mixed —get()
Loads a command.
public
get(string $name) : Command
Parameters
- $name : string
Return values
Command —getNames()
public
getNames() : array<string|int, string>
Return values
array<string|int, string> —has()
Checks if a command exists.
public
has(string $name) : bool
Parameters
- $name : string