Class definitions for a single class

 Methods

__construct()

__construct(string $class) 

Parameters

$class

string

addMethod()

addMethod(string $method, mixed | bool | null $isRequired) : \Zend\Di\Definition\self

Parameters

$method

string

$isRequired

mixedboolnull

Returns

\Zend\Di\Definition\self

addMethodParameter()

addMethodParameter($method, $parameterName, array $parameterInfo) : \Zend\Di\Definition\ClassDefinition

Parameters

$method

$parameterName

$parameterInfo

array

(keys: required, type)

Returns

Return the supertypes for this class

getClassSupertypes(string $class) : string[]

Parameters

$class

string

Returns

string[]

Retrieves classes in this definition

getClasses() : string[]

Returns

string[]

getInstantiator()

getInstantiator(string $class) : string | array

Parameters

$class

string

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

Returns

array

Return an array of the injection methods for a given class

getMethods(string $class) : string[]

Parameters

$class

string

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

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

Returns

bool

setInstantiator()

setInstantiator(null | \Callable | array | string $instantiator) : \Zend\Di\Definition\self

Parameters

$instantiator

null\Callablearraystring

Returns

\Zend\Di\Definition\self

setSupertypes()

setSupertypes(array $supertypes) : \Zend\Di\Definition\self

Parameters

$supertypes

string[]

Returns

\Zend\Di\Definition\self

 Properties

 

$class

$class : null | string

 

$instantiator

$instantiator : null | \Callable | array | string

 

$methodParameters

$methodParameters : array

 

$methods

$methods : bool[]

 

$supertypes

$supertypes : string[]