Object containing definitions for a single class

package Default

 Methods

Add injection method

addInjectionMethod(\Zend\Di\Definition\Builder\InjectionMethod $injectionMethod) : \Zend\Di\Definition\Builder\PhpClass

Parameters

$injectionMethod

\Zend\Di\Definition\Builder\InjectionMethod

Returns

\Zend\Di\Definition\Builder\PhpClass

addSuperType()

addSuperType(string $superType) : \Zend\Di\Definition\Builder\PhpClass

Parameters

$superType

string

Returns

\Zend\Di\Definition\Builder\PhpClass

Create and register an injection method

createInjectionMethod(null|string $name = null) : \Zend\Di\Definition\Builder\InjectionMethod

Optionally takes the method name.

This method may be used in lieu of addInjectionMethod() in order to provide a more fluent interface for building classes with injection methods.

Parameters

$name

nullstring

Returns

\Zend\Di\Definition\Builder\InjectionMethod

getInjectionMethods()

getInjectionMethods() : array<mixed,\Zend\Di\Definition\Builder\InjectionMethod>

Returns

array<mixed,\Zend\Di\Definition\Builder\InjectionMethod>

getInstantiator()

getInstantiator() : array | \Callable | string

Returns

array\Callablestring

Determine what class will be used by {@link createInjectionMethod()}

getMethodBuilder() : string

Mainly to provide the ability to temporarily override the class used.

Returns

string

Get name

getName() : string

Returns

string

Get super types

getSuperTypes() : array

Returns

array

setInstantiator()

setInstantiator(string|\Callable|array $instantiator) : \Zend\Di\Definition\Builder\PhpClass

Parameters

$instantiator

string\Callablearray

Returns

\Zend\Di\Definition\Builder\PhpClass

Override which class will be used by {@link createInjectionMethod()}

setMethodBuilder(string $class) : \Zend\Di\Definition\Builder\PhpClass

Parameters

$class

string

Returns

\Zend\Di\Definition\Builder\PhpClass

Set name

setName(string $name) : \Zend\Di\Definition\Builder\PhpClass

Parameters

$name

string

Returns

\Zend\Di\Definition\Builder\PhpClass

 Properties

 

$defaultMethodBuilder

$defaultMethodBuilder : string

Default

'Zend\Di\Definition\Builder\InjectionMethod'
 

$injectionMethods

$injectionMethods : array<mixed,\Zend\Di\Definition\Builder\InjectionMethod>

Default

array()
 

$instantiator

$instantiator : string | \Callable | array

Default

'__construct'
 

$name

$name : null | string

Default

null
 

$superTypes

$superTypes : array

Default

array()