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

Object containing definitions for a single class. More...

Public Member Functions

 setName ($name)
 Set name.
 
 getName ()
 Get name.
 
 setInstantiator ($instantiator)
 
 getInstantiator ()
 
 addSuperType ($superType)
 
 getSuperTypes ()
 Get super types.
 
 addInjectionMethod (InjectionMethod $injectionMethod)
 Add injection method.
 
 createInjectionMethod ($name=null)
 Create and register an injection method.
 
 setMethodBuilder ($class)
 Override which class will be used by createInjectionMethod().
 
 getMethodBuilder ()
 Determine what class will be used by createInjectionMethod().
 
 getInjectionMethods ()
 

Protected Attributes

 $defaultMethodBuilder = 'Zend\Di\Definition\Builder\InjectionMethod'
 
 $name = null
 
 $instantiator = '__construct'
 
 $injectionMethods = []
 
 $superTypes = []
 

Detailed Description

Object containing definitions for a single class.

Member Function Documentation

addInjectionMethod ( InjectionMethod  $injectionMethod)

Add injection method.

Parameters
InjectionMethod$injectionMethod
Returns
PhpClass
addSuperType (   $superType)
Parameters
string$superType
Returns
PhpClass
createInjectionMethod (   $name = null)

Create and register an injection method.

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
null | string$name
Returns
InjectionMethod
getInjectionMethods ( )
Returns
InjectionMethod[]
getInstantiator ( )
Returns
array||string
getMethodBuilder ( )

Determine what class will be used by createInjectionMethod().

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

Returns
string
getName ( )

Get name.

Returns
string
getSuperTypes ( )

Get super types.

Returns
array
setInstantiator (   $instantiator)
Parameters
string | \Callable | array$instantiator
Returns
PhpClass
setMethodBuilder (   $class)

Override which class will be used by createInjectionMethod().

Parameters
string$class
Returns
PhpClass
setName (   $name)

Set name.

Parameters
string$name
Returns
PhpClass

Member Data Documentation

$defaultMethodBuilder = 'Zend\Di\Definition\Builder\InjectionMethod'
protected
$injectionMethods = []
protected
$instantiator = '__construct'
protected
$name = null
protected
$superTypes = []
protected