ServiceDescriptionFactory
in package
implements
FactoryInterface
Command factory used to create commands based on service descriptions
Table of Contents
Interfaces
- FactoryInterface
- Interface for creating commands by name
Properties
Methods
- __construct() : mixed
- factory() : CommandInterface|null
- Create a command by name
- getServiceDescription() : ServiceDescriptionInterface
- Returns the service description
- setServiceDescription() : FactoryInterface
- Change the service description used with the factory
Properties
$description
protected
ServiceDescriptionInterface
$description
$inflector
protected
InflectorInterface
$inflector
Methods
__construct()
public
__construct(ServiceDescriptionInterface $description[, InflectorInterface $inflector = null ]) : mixed
Parameters
- $description : ServiceDescriptionInterface
-
Service description
- $inflector : InflectorInterface = null
-
Optional inflector to use if the command is not at first found
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
Return values
CommandInterface|nullgetServiceDescription()
Returns the service description
public
getServiceDescription() : ServiceDescriptionInterface
Return values
ServiceDescriptionInterfacesetServiceDescription()
Change the service description used with the factory
public
setServiceDescription(ServiceDescriptionInterface $description) : FactoryInterface
Parameters
- $description : ServiceDescriptionInterface
-
Service description to use