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

Class definitions based on a set of directories to be scanned. More...

Public Member Functions

 __construct (IntrospectionStrategy $introspectionStrategy=null)
 Constructor.
 
 setIntrospectionStrategy (IntrospectionStrategy $introspectionStrategy)
 Set introspection strategy.
 
 setAllowReflectionExceptions ($allowReflectionExceptions=true)
 
 getIntrospectionStrategy ()
 Get introspection strategy.
 
 addDirectory ($directory)
 Add directory.
 
 addDirectoryScanner (DirectoryScanner $directoryScanner)
 Add directory scanner.
 
 addCodeScannerFile (FileScanner $fileScanner)
 Add code scanner file.
 
 compile ()
 Compile.
 
 toArrayDefinition ()
 
 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

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

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

 
 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 Attributes

 $isCompiled = false
 
 $introspectionStrategy = null
 
 $allowReflectionExceptions = false
 
 $directoryScanner = null
 
 $classes = []
 

Detailed Description

Class definitions based on a set of directories to be scanned.

Constructor & Destructor Documentation

__construct ( IntrospectionStrategy  $introspectionStrategy = null)

Constructor.

Parameters
null | IntrospectionStrategy$introspectionStrategy

Member Function Documentation

addCodeScannerFile ( FileScanner  $fileScanner)

Add code scanner file.

Parameters
FileScanner$fileScanner
addDirectory (   $directory)

Add directory.

Parameters
string$directory
addDirectoryScanner ( DirectoryScanner  $directoryScanner)

Add directory scanner.

Parameters
DirectoryScanner$directoryScanner
compile ( )

Compile.

Returns
void
getClasses ( )

Retrieves classes in this definition.

Returns
string[]

Implements DefinitionInterface.

getClassSupertypes (   $class)

Return the supertypes for this class.

Parameters
string$class
Returns
string[]

Implements DefinitionInterface.

getInstantiator (   $class)

Parameters
string$class
Returns
string|array

Implements DefinitionInterface.

getIntrospectionStrategy ( )

Get introspection strategy.

Returns
IntrospectionStrategy
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

Implements DefinitionInterface.

getMethods (   $class)

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

Parameters
string$class
Returns
string[]

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

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

Implements DefinitionInterface.

setAllowReflectionExceptions (   $allowReflectionExceptions = true)
Parameters
bool$allowReflectionExceptions
setIntrospectionStrategy ( IntrospectionStrategy  $introspectionStrategy)

Set introspection strategy.

Parameters
IntrospectionStrategy$introspectionStrategy
toArrayDefinition ( )

Member Data Documentation

$allowReflectionExceptions = false
protected
$classes = []
protected
$directoryScanner = null
protected
$introspectionStrategy = null
protected
$isCompiled = false
protected