PHP Class Neos\Flow\Aop\Builder\AbstractMethodInterceptorBuilder

Mostrar archivo Open project: neos/flow-development-collection

Protected Properties

Property Type Description
$compiler Neos\Flow\ObjectManagement\Proxy\Compiler
$reflectionService Neos\Flow\Reflection\ReflectionService

Public Methods

Method Description
build ( string $methodName, array $methodMetaInformation, string $targetClassName ) : string Builds method interception PHP code
injectCompiler ( Compiler $compiler ) : void
injectReflectionService ( ReflectionService $reflectionService ) : void Injects the reflection service

Protected Methods

Method Description
buildAdvicesCode ( array $groupedAdvices, string $methodName, string $targetClassName, string $declaringClassName ) : string Builds the advice interception code, to be used in a method interceptor.
buildArraySetupCode ( array $array ) : string Builds a string containing PHP code to build the array given as input.
buildMethodArgumentsArrayCode ( string $className, string $methodName, boolean $useArgumentsArray = false ) : string Builds the PHP code for the method arguments array which is passed to the constructor of a new join point. Used in the method interceptor functions.
buildSavedConstructorParametersCode ( string $className ) : string Generates the parameters code needed to call the constructor with the saved parameters.

Method Details

build() abstract public method

Builds method interception PHP code
abstract public build ( string $methodName, array $methodMetaInformation, string $targetClassName ) : string
$methodName string Name of the method to build an interceptor for
$methodMetaInformation array An array of method names and their meta information, including advices for the method (if any)
$targetClassName string Name of the target class to build the interceptor for
return string PHP code of the interceptor

buildAdvicesCode() protected method

Builds the advice interception code, to be used in a method interceptor.
protected buildAdvicesCode ( array $groupedAdvices, string $methodName, string $targetClassName, string $declaringClassName ) : string
$groupedAdvices array The advices grouped by advice type
$methodName string Name of the method the advice applies to
$targetClassName string Name of the target class
$declaringClassName string Name of the declaring class. This is usually the same as the $targetClassName. However, it is the introduction interface for introduced methods.
return string PHP code to be used in the method interceptor

buildArraySetupCode() protected method

Builds a string containing PHP code to build the array given as input.
protected buildArraySetupCode ( array $array ) : string
$array array
return string e.g. 'array()' or 'array(1 => 'bar')

buildMethodArgumentsArrayCode() protected method

Builds the PHP code for the method arguments array which is passed to the constructor of a new join point. Used in the method interceptor functions.
protected buildMethodArgumentsArrayCode ( string $className, string $methodName, boolean $useArgumentsArray = false ) : string
$className string Name of the declaring class of the method
$methodName string Name of the method to create arguments array code for
$useArgumentsArray boolean If set, the $methodArguments array will be built from $arguments instead of using the actual parameter variables.
return string The generated code to be used in an "array()" definition

buildSavedConstructorParametersCode() protected method

Generates the parameters code needed to call the constructor with the saved parameters.
protected buildSavedConstructorParametersCode ( string $className ) : string
$className string Name of the class the method is declared in
return string The generated parameters code

injectCompiler() public method

public injectCompiler ( Compiler $compiler ) : void
$compiler Neos\Flow\ObjectManagement\Proxy\Compiler
return void

injectReflectionService() public method

Injects the reflection service
public injectReflectionService ( ReflectionService $reflectionService ) : void
$reflectionService Neos\Flow\Reflection\ReflectionService The reflection service
return void

Property Details

$compiler protected_oe property

protected Compiler,Neos\Flow\ObjectManagement\Proxy $compiler
return Neos\Flow\ObjectManagement\Proxy\Compiler

$reflectionService protected_oe property

protected ReflectionService,Neos\Flow\Reflection $reflectionService
return Neos\Flow\Reflection\ReflectionService