PHP Class Go\Proxy\FunctionProxy

Inheritance: extends AbstractProxy
Datei anzeigen Open project: goaop/framework

Protected Properties

Property Type Description
$functionAdvices array List of advices for functions
$functionsCode Source code for functions
$namespace string Name for the current namespace

Public Methods

Method Description
__construct ( Go\ParserReflection\ReflectionFileNamespace $namespace, array $advices = [] ) Constructs functions stub class from namespace Reflection
__toString ( ) {@inheritDoc}
getJoinPoint ( string $joinPointName, string $namespace ) : Go\Aop\Intercept\FunctionInvocation Returns a joinpoint for specific function in the namespace
injectJoinPoints ( string $namespace, array $advices = [] ) : void Inject advices for given trait
override ( ReflectionFunction $function, string $body ) Override function with new body

Protected Methods

Method Description
getJoinpointInvocationBody ( ReflectionFunction $function ) : string Creates definition for trait method body

Method Details

__construct() public method

Constructs functions stub class from namespace Reflection
public __construct ( Go\ParserReflection\ReflectionFileNamespace $namespace, array $advices = [] )
$namespace Go\ParserReflection\ReflectionFileNamespace Reflection of namespace
$advices array List of function advices

__toString() public method

{@inheritDoc}
public __toString ( )

getJoinPoint() public static method

Returns a joinpoint for specific function in the namespace
public static getJoinPoint ( string $joinPointName, string $namespace ) : Go\Aop\Intercept\FunctionInvocation
$joinPointName string Special joinpoint name
$namespace string Name of the namespace
return Go\Aop\Intercept\FunctionInvocation

getJoinpointInvocationBody() protected method

Creates definition for trait method body
protected getJoinpointInvocationBody ( ReflectionFunction $function ) : string
$function ReflectionFunction Method reflection
return string new method body

injectJoinPoints() public static method

NB This method will be used as a callback during source code evaluation to inject joinpoints
public static injectJoinPoints ( string $namespace, array $advices = [] ) : void
$namespace string Aop child proxy class
$advices array List of advices to inject into class
return void

override() public method

Override function with new body
public override ( ReflectionFunction $function, string $body )
$function ReflectionFunction Function reflection
$body string New body for function

Property Details

$functionAdvices protected_oe static_oe property

List of advices for functions
protected static array $functionAdvices
return array

$functionsCode protected_oe property

Source code for functions
protected $functionsCode

$namespace protected_oe property

Name for the current namespace
protected string $namespace
return string