Go\Aop\Intercept\FieldAccess::getAccessType PHP Method

getAccessType() public method

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

Usage Example

Exemplo n.º 1
0
 /**
  * Method that should be called around property
  *
  * @param FieldAccess $property Joinpoint
  *
  * @Around("access(* Example->*)")
  * @return mixed
  */
 public function aroundFieldAccess(FieldAccess $property)
 {
     $type = $property->getAccessType() === FieldAccess::READ ? 'read' : 'write';
     $value = $property->proceed();
     echo "Calling Around Interceptor for field: ", get_class($property->getThis()), "->", $property->getField()->getName(), ", access: {$type}", ", value: ", json_encode($value), "<br>\n";
     return $value;
 }
All Usage Examples Of Go\Aop\Intercept\FieldAccess::getAccessType