Open Journal Systems  3.3.0
Guzzle\Service\Resource\ResourceIteratorClassFactory Class Reference
Inheritance diagram for Guzzle\Service\Resource\ResourceIteratorClassFactory:
Guzzle\Service\Resource\AbstractResourceIteratorFactory Guzzle\Service\Resource\ResourceIteratorFactoryInterface

Public Member Functions

 __construct ($namespaces=array(), InflectorInterface $inflector=null)
 
 registerNamespace ($namespace)
 
- Public Member Functions inherited from Guzzle\Service\Resource\AbstractResourceIteratorFactory
 build (CommandInterface $command, array $options=array())
 
 canBuild (CommandInterface $command)
 

Protected Member Functions

 getClassName (CommandInterface $command)
 

Protected Attributes

 $inflector
 
 $namespaces
 

Detailed Description

Factory for creating {

See also
ResourceIteratorInterface} objects using a convention of storing iterator classes under a root namespace using the name of a {
CommandInterface} object as a convention for determining the name of an iterator class. The command name is converted to CamelCase and Iterator is appended (e.g. abc_foo => AbcFoo).

Definition at line 14 of file ResourceIteratorClassFactory.php.

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Service\Resource\ResourceIteratorClassFactory::__construct (   $namespaces = array(),
InflectorInterface  $inflector = null 
)
Parameters
string | array$namespacesList of namespaces for iterator objects
InflectorInterface$inflectorInflector used to resolve class names

Definition at line 32 of file ResourceIteratorClassFactory.php.

References Guzzle\Service\Resource\ResourceIteratorClassFactory\$inflector, Guzzle\Service\Resource\ResourceIteratorClassFactory\$namespaces, and Guzzle\Inflection\Inflector\getDefault().

Member Function Documentation

◆ getClassName()

Guzzle\Service\Resource\ResourceIteratorClassFactory::getClassName ( CommandInterface  $command)
protected

Get the name of the class to instantiate for the command

Parameters
CommandInterface$commandCommand that is associated with the iterator
Returns
string

Reimplemented from Guzzle\Service\Resource\AbstractResourceIteratorFactory.

Definition at line 52 of file ResourceIteratorClassFactory.php.

References Guzzle\Service\Command\CommandInterface\getName().

◆ registerNamespace()

Guzzle\Service\Resource\ResourceIteratorClassFactory::registerNamespace (   $namespace)

Registers a namespace to check for Iterators

Parameters
string$namespaceNamespace which contains Iterator classes
Returns
self

Definition at line 45 of file ResourceIteratorClassFactory.php.

Field Documentation

◆ $inflector

InflectorInterface Guzzle\Service\Resource\ResourceIteratorClassFactory::$inflector
protected

Inflector used to determine class names

Definition at line 26 of file ResourceIteratorClassFactory.php.

Referenced by Guzzle\Service\Resource\ResourceIteratorClassFactory\__construct().

◆ $namespaces

array Guzzle\Service\Resource\ResourceIteratorClassFactory::$namespaces
protected

List of namespaces used to look for classes

Definition at line 20 of file ResourceIteratorClassFactory.php.

Referenced by Guzzle\Service\Resource\ResourceIteratorClassFactory\__construct().


The documentation for this class was generated from the following file: