Documentation

ContainerCommandLoader
in package
implements CommandLoaderInterface

Loads commands from a PSR-11 container.

Tags
author

Robin Chalas robin.chalas@gmail.com

Interfaces, Classes and Traits

CommandLoaderInterface

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

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

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
Return values
bool

Search results