MapFactory
in package
implements
FactoryInterface
Command factory used when explicitly mapping strings to command classes
Table of Contents
Interfaces
- FactoryInterface
- Interface for creating commands by name
Properties
- $map : array<string|int, mixed>
Methods
- __construct() : mixed
- factory() : CommandInterface|null
- Create a command by name
Properties
$map
protected
array<string|int, mixed>
$map
Associative array mapping command names to classes
Methods
__construct()
public
__construct(array<string|int, mixed> $map) : mixed
Parameters
- $map : array<string|int, mixed>
-
Associative array mapping command names to classes
factory()
Create a command by name
public
factory(mixed $name[, array<string|int, mixed> $args = array() ]) : CommandInterface|null
Parameters
- $name : mixed
-
Command to create
- $args : array<string|int, mixed> = array()
-
Command arguments