ContainerCommandLoader
in package
implements
CommandLoaderInterface
Loads commands from a PSR-11 container.
Tags
Table of Contents
Interfaces
Properties
- $commandMap : array<string|int, mixed>
- $container : ContainerInterface
Methods
- __construct() : mixed
- get() : Command
- Loads a command.
- getNames() : array<string|int, string>
- has() : bool
- Checks if a command exists.
Properties
$commandMap
private
array<string|int, mixed>
$commandMap
$container
private
ContainerInterface
$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
get()
Loads a command.
public
get(string $name) : Command
Parameters
- $name : string
Return values
CommandgetNames()
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