Documentation

ResourceIteratorClassFactory extends AbstractResourceIteratorFactory
in package

Factory for creating {@see ResourceIteratorInterface} objects using a convention of storing iterator classes under a root namespace using the name of a {@see 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).

Table of Contents

Properties

$inflector  : InflectorInterface
$namespaces  : array<string|int, mixed>

Methods

__construct()  : mixed
build()  : ResourceIteratorInterface
Create a resource iterator
canBuild()  : bool
Check if the factory can create an iterator
registerNamespace()  : self
Registers a namespace to check for Iterators
getClassName()  : string
Get the name of the class to instantiate for the command

Properties

Methods

__construct()

public __construct([string|array<string|int, mixed> $namespaces = array() ][, InflectorInterface $inflector = null ]) : mixed
Parameters
$namespaces : string|array<string|int, mixed> = array()

List of namespaces for iterator objects

$inflector : InflectorInterface = null

Inflector used to resolve class names

registerNamespace()

Registers a namespace to check for Iterators

public registerNamespace(string $namespace) : self
Parameters
$namespace : string

Namespace which contains Iterator classes

Return values
self

        
On this page

Search results