Class Guzzle\Service\Command\Factory\CompositeFactory

InheritanceGuzzle\Service\Command\Factory\CompositeFactory
ImplementsCountable, Guzzle\Service\Command\Factory\FactoryInterface, IteratorAggregate

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

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$factories array Array of command factories Guzzle\Service\Command\Factory\CompositeFactory

Property Details

$factories protected property

Array of command factories

protected array $factories null

Method Details

__construct() public method

public void __construct ( array $factories = [] )
$factories array

Array of command factories

add() public method

Add a command factory to the chain

public Guzzle\Service\Command\Factory\CompositeFactory add ( Guzzle\Service\Command\Factory\FactoryInterface $factory, $before null )
$factory Guzzle\Service\Command\Factory\FactoryInterface

Factory to add

$before string|Guzzle\Service\Command\Factory\FactoryInterface

Insert the new command factory before a command factory class or object

                                    matching a class name.
count() public method

public void count ( )
factory() public method

Create a command using the associated command factories

public Guzzle\Service\Command\CommandInterface factory ( $name, array $args = [] )
$name string

Name of the command

$args array

Command arguments

find() public method

Get a command factory by class name

public null|Guzzle\Service\Command\Factory\FactoryInterface find ( $factory )
$factory string|Guzzle\Service\Command\Factory\FactoryInterface

Command factory class or instance

getDefaultChain() public static method

Get the default chain to use with clients

public static self getDefaultChain ( Guzzle\Service\ClientInterface $client )
$client Guzzle\Service\ClientInterface

Client to base the chain on

getIterator() public method

public void getIterator ( )
has() public method

Check if the chain contains a specific command factory

public bool has ( $factory )
$factory Guzzle\Service\Command\Factory\FactoryInterface|string

Factory to check

remove() public method

Remove a specific command factory from the chain

public Guzzle\Service\Command\Factory\CompositeFactory remove ( $factory null )
$factory string|Guzzle\Service\Command\Factory\FactoryInterface

Factory to remove by name or instance