getThis() публичный Метод

Returns the object that holds the current joinpoint's static part.
public getThis ( ) : object | string
Результат object | string the object for dynamic call or string with name of scope
 /**
  * Method invoker
  *
  * @param Joinpoint $joinpoint the method invocation joinpoint
  *
  * @return mixed the result of the call to {@see Joinpoint->proceed()}
  */
 public final function invoke(Joinpoint $joinpoint)
 {
     if ($joinpoint instanceof Invocation) {
         if ($this->dynamicPointFilter->matches($joinpoint->getStaticPart(), $joinpoint->getThis(), $joinpoint->getArguments())) {
             return $this->interceptor->invoke($joinpoint);
         }
     }
     return $joinpoint->proceed();
 }
 /**
  * Method invoker
  *
  * @param Joinpoint $joinpoint the method invocation joinpoint
  *
  * @return mixed the result of the call to {@see Joinpoint->proceed()}
  */
 public final function invoke(Joinpoint $joinpoint)
 {
     if ($joinpoint instanceof Invocation) {
         if ($this->pointcut->matches($joinpoint->getStaticPart(), $joinpoint->getThis(), $joinpoint->getArguments())) {
             return $this->adviceMethod->invoke($joinpoint);
         }
     }
     return $joinpoint->proceed();
 }
 /**
  * Method invoker
  *
  * @param Joinpoint $joinpoint the method invocation joinpoint
  *
  * @return mixed the result of the call to {@see Joinpoint->proceed()}
  */
 public final function invoke(Joinpoint $joinpoint)
 {
     if ($joinpoint instanceof Invocation) {
         $point = $joinpoint->getStaticPart();
         $instance = $joinpoint->getThis();
         $context = new \ReflectionClass($instance);
         if ($this->pointFilter->matches($point, $context, $instance, $joinpoint->getArguments())) {
             return $this->interceptor->invoke($joinpoint);
         }
     }
     return $joinpoint->proceed();
 }
 /**
  * Implement this method to perform extra treatments before and
  * after the invocation. Polite implementations would certainly
  * like to invoke {@link Joinpoint::proceed()}.
  *
  * @param Joinpoint $joinpoint the method invocation joinpoint
  *
  * @return mixed the result of the call to {@link Joinpoint::proceed()}
  */
 public function invoke(Joinpoint $joinpoint)
 {
     $this->adviceMethod->__invoke($joinpoint->getThis(), $joinpoint->getStaticPart(), $this->message, $this->level);
     return $joinpoint->proceed();
 }
 /**
  * Implement this method to perform extra treatments before and
  * after the invocation. Polite implementations would certainly
  * like to invoke {@link Joinpoint::proceed()}.
  *
  * @param Joinpoint $joinpoint the method invocation joinpoint
  *
  * @return mixed the result of the call to {@link Joinpoint::proceed()}
  */
 public function invoke(Joinpoint $joinpoint)
 {
     /** @var ReflectionMethod|ReflectionProperty $reflection */
     $reflection = $joinpoint->getStaticPart();
     $reflectorName = 'unknown';
     if ($reflection && method_exists($reflection, 'getName')) {
         $reflectorName = $reflection->getName();
     }
     $this->adviceMethod->__invoke($joinpoint->getThis(), $reflectorName, $this->message, $this->level);
     return $joinpoint->proceed();
 }
Пример #6
0
 /**
  * Implement this method to perform extra treatments before and
  * after the invocation. Polite implementations would certainly
  * like to invoke {@link Joinpoint::proceed()}.
  *
  * @param Joinpoint $joinpoint the method invocation joinpoint
  *
  * @return mixed the result of the call to {@link Joinpoint::proceed()}
  */
 public function invoke(Joinpoint $joinpoint)
 {
     $reflection = $joinpoint->getStaticPart();
     $reflectorName = 'unknown';
     if ($reflection && method_exists($reflection, 'getName')) {
         $reflectorName = $reflection->getName();
     }
     $adviceMethod = $this->adviceMethod;
     $adviceMethod($joinpoint->getThis(), $reflectorName, $this->message, $this->level);
     return $joinpoint->proceed();
 }