Documentation

CompositeFactory
in package
implements IteratorAggregate, Countable, FactoryInterface

Composite factory used by a client object to create command objects utilizing multiple factories

Table of Contents

Interfaces

IteratorAggregate
Countable
FactoryInterface
Interface for creating commands by name

Properties

$factories  : array<string|int, mixed>

Methods

__construct()  : mixed
add()  : CompositeFactory
Add a command factory to the chain
count()  : mixed
factory()  : CommandInterface
Create a command using the associated command factories
find()  : null|FactoryInterface
Get a command factory by class name
getDefaultChain()  : self
Get the default chain to use with clients
getIterator()  : mixed
has()  : bool
Check if the chain contains a specific command factory
remove()  : CompositeFactory
Remove a specific command factory from the chain

Properties

$factories

protected array<string|int, mixed> $factories

Array of command factories

Methods

__construct()

public __construct([array<string|int, mixed> $factories = array() ]) : mixed
Parameters
$factories : array<string|int, mixed> = array()

Array of command factories

factory()

Create a command using the associated command factories

public factory(string $name[, array<string|int, mixed> $args = array() ]) : CommandInterface
Parameters
$name : string

Name of the command

$args : array<string|int, mixed> = array()

Command arguments

Return values
CommandInterface

getIterator()

public getIterator() : mixed
Attributes
#[ReturnTypeWillChange]

        
On this page

Search results