Class definitions based on a configuration array

package Default

 Methods

Add class

addClass(\Zend\Di\Definition\Builder\PhpClass $phpClass) : \Zend\Di\Definition\BuilderDefinition

Parameters

$phpClass

\Zend\Di\Definition\Builder\PhpClass

Returns

\Zend\Di\Definition\BuilderDefinition

Create a class builder object using default class builder class

createClass(null|string $name = null) : \Zend\Di\Definition\Builder\PhpClass

This method is a factory that can be used in place of addClass().

Parameters

$name

nullstring

Optional name of class to assign

Returns

\Zend\Di\Definition\Builder\PhpClass

Create classes from array

createClassesFromArray(array $builderData) : void

Parameters

$builderData

array

Get the class used for {@link createClass()}

getClassBuilder() : string

This is primarily to allow developers to temporarily override the builder strategy.

Returns

string

Return the supertypes for this class

getClassSupertypes(string $class) 
inherited_from \Zend\Di\Definition\DefinitionInterface::getClassSupertypes()

Parameters

$class

Exceptions

\Zend\Di\Exception\RuntimeException

Retrieves classes in this definition

getClasses() 
inherited_from \Zend\Di\Definition\DefinitionInterface::getClasses()

getInstantiator()

getInstantiator(string $class) 
inherited_from \Zend\Di\Definition\DefinitionInterface::getInstantiator()

Parameters

$class

Exceptions

\Zend\Di\Exception\RuntimeException

getMethodParameters() return information about a methods parameters.

getMethodParameters(string $class, string $method) 

Should return an ordered named array of parameters for a given method. Each value should be an array, of length 4 with the following information:

array( 0, // string|null: Type Name (if it exists) 1, // bool: whether this param is required 2, // string: fully qualified path to this parameter 3, // mixed: default value );

inherited_from \Zend\Di\Definition\DefinitionInterface::getMethodParameters()

Parameters

$class

$method

Exceptions

\Zend\Di\Exception\RuntimeException

Return an array of the injection methods for a given class

getMethods(string $class) 
inherited_from \Zend\Di\Definition\DefinitionInterface::getMethods()

Parameters

$class

Exceptions

\Zend\Di\Exception\RuntimeException

Return whether the class exists in this definition

hasClass(string $class) 
inherited_from \Zend\Di\Definition\DefinitionInterface::hasClass()

Parameters

$class

hasMethod()

hasMethod(string $class, string $method) 
inherited_from \Zend\Di\Definition\DefinitionInterface::hasMethod()

Parameters

$class

$method

Exceptions

\Zend\Di\Exception\RuntimeException

hasMethodParameters()

hasMethodParameters($class, $method) 
inherited_from \Zend\Di\Definition\DefinitionInterface::hasMethodParameters()

Parameters

$class

$method

Return if there are injection methods

hasMethods(string $class) 
inherited_from \Zend\Di\Definition\DefinitionInterface::hasMethods()

Parameters

$class

Exceptions

\Zend\Di\Exception\RuntimeException

Set the class to use with {@link createClass()}

setClassBuilder(string $class) : \Zend\Di\Definition\BuilderDefinition

Parameters

$class

string

Returns

\Zend\Di\Definition\BuilderDefinition

getClass()

getClass(string $name) : boolean | \Zend\Di\Definition\Builder\PhpClass

Parameters

$name

string

Returns

boolean\Zend\Di\Definition\Builder\PhpClass

 Properties

 

$classes

$classes : array<mixed,\Zend\Di\Definition\Builder\PhpClass>

Default

array()
 

$defaultClassBuilder

$defaultClassBuilder : string

Default

'Zend\Di\Definition\Builder\PhpClass'