Zend Framework  3.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BuilderDefinition Class Reference

Class definitions based on a configuration array. More...

Public Member Functions

 createClassesFromArray (array $builderData)
 Create classes from array.
 
 addClass (Builder\PhpClass $phpClass)
 Add class.
 
 createClass ($name=null)
 Create a class builder object using default class builder class.
 
 setClassBuilder ($class)
 Set the class to use with createClass().
 
 getClassBuilder ()
 Get the class used for createClass().
 
 getClasses ()
 Retrieves classes in this definition.
Returns
string[]

 
 hasClass ($class)
 Return whether the class exists in this definition.
Parameters
string$class
Returns
bool

 
 getClassSupertypes ($class)
 Return the supertypes for this class.
Parameters
string$class
Returns
string[]

 
 getInstantiator ($class)
 
Parameters
string$class
Returns
string|array

 
 hasMethods ($class)
 Return if there are injection methods.
Parameters
string$class
Returns
bool

 
 getMethods ($class)
 Return an array of the injection methods for a given class.
Parameters
string$class
Returns
string[]

 
 hasMethod ($class, $method)
 
Parameters
string$class
string$method
Returns
bool

 
 hasMethodParameters ($class, $method)
 
Parameters
$class
$method
Returns
bool

 
 getMethodParameters ($class, $method)
 getMethodParameters() return information about a methods parameters.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
string$class
string$method
Returns
array

 

Protected Member Functions

 getClass ($name)
 

Protected Attributes

 $defaultClassBuilder = 'Zend\Di\Definition\Builder\PhpClass'
 
 $classes = []
 

Detailed Description

Class definitions based on a configuration array.

Member Function Documentation

addClass ( Builder\PhpClass  $phpClass)

Add class.

Parameters
Builder\PhpClass$phpClass
Returns
BuilderDefinition
createClass (   $name = null)

Create a class builder object using default class builder class.

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

Parameters
null | string$nameOptional name of class to assign
Returns
Builder
createClassesFromArray ( array  $builderData)

Create classes from array.

Parameters
array$builderData
Returns
void
getClass (   $name)
protected
Parameters
string$name
Returns
bool|Builder
getClassBuilder ( )

Get the class used for createClass().

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

Returns
string
getClasses ( )

Retrieves classes in this definition.

Returns
string[]

Implements DefinitionInterface.

getClassSupertypes (   $class)

Return the supertypes for this class.

Parameters
string$class
Returns
string[]

Exceptions
\Zend\Di\Exception\RuntimeException

Implements DefinitionInterface.

getInstantiator (   $class)

Parameters
string$class
Returns
string|array

Exceptions
\Zend\Di\Exception\RuntimeException

Implements DefinitionInterface.

getMethodParameters (   $class,
  $method 
)

getMethodParameters() return information about a methods parameters.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
string$class
string$method
Returns
array

Exceptions
\Zend\Di\Exception\RuntimeException

Implements DefinitionInterface.

getMethods (   $class)

Return an array of the injection methods for a given class.

Parameters
string$class
Returns
string[]

Exceptions
\Zend\Di\Exception\RuntimeException

Implements DefinitionInterface.

hasClass (   $class)

Return whether the class exists in this definition.

Parameters
string$class
Returns
bool

Implements DefinitionInterface.

hasMethod (   $class,
  $method 
)

Parameters
string$class
string$method
Returns
bool

Exceptions
\Zend\Di\Exception\RuntimeException

Implements DefinitionInterface.

hasMethodParameters (   $class,
  $method 
)

Parameters
$class
$method
Returns
bool

Implements DefinitionInterface.

hasMethods (   $class)

Return if there are injection methods.

Parameters
string$class
Returns
bool

Exceptions
\Zend\Di\Exception\RuntimeException

Implements DefinitionInterface.

setClassBuilder (   $class)

Set the class to use with createClass().

Parameters
string$class
Returns
BuilderDefinition

Member Data Documentation

$classes = []
protected
$defaultClassBuilder = 'Zend\Di\Definition\Builder\PhpClass'
protected