PHP Class Go\Aop\Framework\ClassFieldAccess

Inheritance: extends AbstractJoinpoint, implements Go\Aop\Intercept\FieldAccess
Datei anzeigen Open project: goaop/framework

Protected Properties

Property Type Description
$instance object Instance of object for accessing
$newValue mixed New value to set
$reflectionProperty ReflectionProperty Instance of reflection property

Public Methods

Method Description
__construct ( string $className, string $fieldName, array $advices ) Constructor for field access
__invoke ( object $instance, integer $accessType, mixed &$originalValue, mixed $newValue = NAN ) : mixed Invokes current field access with all interceptors
__toString ( ) : string Returns a friendly description of current joinpoint
ensureScopeRule ( integer $stackLevel = 2 ) : true Checks scope rules for accessing property
getAccessType ( ) : integer Returns the access type.
getField ( ) : ReflectionProperty Gets the field being accessed.
getStaticPart ( ) : object Returns the static part of this joinpoint.
getThis ( ) : object | null Returns the object that holds the current joinpoint's static part.
getValue ( ) : mixed Gets the current value of property
getValueToSet ( ) : mixed Gets the value that must be set to the field.
proceed ( ) : void Proceed to the next interceptor in the Chain

Method Details

__construct() public method

Constructor for field access
public __construct ( string $className, string $fieldName, array $advices )
$className string Class name
$fieldName string Field name
$advices array array List of advices for this invocation

__invoke() final public method

Invokes current field access with all interceptors
final public __invoke ( object $instance, integer $accessType, mixed &$originalValue, mixed $newValue = NAN ) : mixed
$instance object Instance of object
$accessType integer Type of access: READ or WRITE
$originalValue mixed Original value of property
$newValue mixed New value to set
return mixed

__toString() final public method

Returns a friendly description of current joinpoint
final public __toString ( ) : string
return string

ensureScopeRule() public method

Checks scope rules for accessing property
public ensureScopeRule ( integer $stackLevel = 2 ) : true
$stackLevel integer Stack level for check
return true if access is OK

getAccessType() public method

Returns the access type.
public getAccessType ( ) : integer
return integer

getField() public method

Gets the field being accessed.
public getField ( ) : ReflectionProperty
return ReflectionProperty the field being accessed.

getStaticPart() final public method

Returns the static part of this joinpoint.
final public getStaticPart ( ) : object
return object

getThis() final public method

Returns the object that holds the current joinpoint's static part.
final public getThis ( ) : object | null
return object | null the object (can be null if the accessible object is static).

getValue() public method

Gets the current value of property
public getValue ( ) : mixed
return mixed

getValueToSet() public method

Gets the value that must be set to the field.
public getValueToSet ( ) : mixed
return mixed

proceed() final public method

Typically this method is called inside previous closure, as instance of Joinpoint is passed to callback Do not call this method directly, only inside callback closures.
final public proceed ( ) : void
return void For field interceptor there is no return values

Property Details

$instance protected_oe property

Instance of object for accessing
protected object $instance
return object

$newValue protected_oe property

New value to set
protected mixed $newValue
return mixed

$reflectionProperty protected_oe property

Instance of reflection property
protected ReflectionProperty $reflectionProperty
return ReflectionProperty