Class definitions based on a configuration array

category Zend
package Zend_Di

 Methods

Add class

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

Create a class builder object using default class builder class

createClass(null | string $name) : \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

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) : string[]

Parameters

$class

string

Exceptions

\Zend\Di\Exception\RuntimeException

Returns

string[]

Retrieves classes in this definition

getClasses() : string[]

Returns

string[]

getInstantiator()

getInstantiator(string $class) : string | array

Parameters

$class

string

Exceptions

\Zend\Di\Exception\RuntimeException

Returns

stringarray

getMethodParameters() return information about a methods parameters.

getMethodParameters(string $class, string $method) : array

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 );

Parameters

$class

string

$method

string

Exceptions

\Zend\Di\Exception\RuntimeException

Returns

array

Return an array of the injection methods for a given class

getMethods(string $class) : string[]

Parameters

$class

string

Exceptions

\Zend\Di\Exception\RuntimeException

Returns

string[]

Return whether the class exists in this definition

hasClass(string $class) : bool

Parameters

$class

string

Returns

bool

hasMethod()

hasMethod(string $class, string $method) : bool

Parameters

$class

string

$method

string

Exceptions

\Zend\Di\Exception\RuntimeException

Returns

bool

hasMethodParameters()

hasMethodParameters($class, $method) : bool

Parameters

$class

$method

Returns

bool

Return if there are injection methods

hasMethods(string $class) : bool

Parameters

$class

string

Exceptions

\Zend\Di\Exception\RuntimeException

Returns

bool

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

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

Parameters

$class

string

Returns

getClass()

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

Parameters

$name

string

Returns

 Properties

   

$defaultClassBuilder

$defaultClassBuilder : string