CommandFactory
in package
implements
CommandFactoryInterface
This is a factory for creating Command and Shell instances.
This factory can be replaced or extended if you need to customize building your command and shell objects.
Table of Contents
Interfaces
- CommandFactoryInterface
- An interface for abstracting creation of command and shell instances.
Properties
- $container : ContainerInterface|null
Methods
- __construct() : mixed
- Constructor
- create() : Shell|CommandInterface
- The factory method for creating Command and Shell instances.
Properties
$container
protected
ContainerInterface|null
$container
Methods
__construct()
Constructor
public
__construct([ContainerInterface|null $container = null ]) : mixed
Parameters
- $container : ContainerInterface|null = null
-
The container to use if available.
create()
The factory method for creating Command and Shell instances.
public
create(string $className) : Shell|CommandInterface
Parameters
- $className : string
-
Command/Shell class name.