Exemplo n.º 1
0
 /**
  * @MethodInterceptor(class-expression=.*AbstractService.*,expression=.*)
  */
 public function profileDomainServices(MethodInvocation $invocation)
 {
     $time = microtime(true);
     $originalInvocation = $invocation->getOriginalInvocation();
     $ret = $invocation->proceed();
     $total = microtime(true) - $time;
     $this->logger->debug("Execution of " . $originalInvocation->getClass() . "::" . $originalInvocation->getMethod() . " took: " . sprintf('%.5f', $total));
     return $ret;
 }
Exemplo n.º 2
0
 public function invoke(MethodInvocation $invocation)
 {
     try {
         echo "Before: " . print_r($invocation->getOriginalInvocation()) . "\n";
         $invocation->proceed(array('b', 'c', 'd'));
         echo "After\n";
     } catch (Exception $e) {
         echo "Move along, nothing happened here.. \n";
     }
 }
Exemplo n.º 3
0
 public function invoke(MethodInvocation $invocation)
 {
     echo "Before2: " . print_r($invocation->getOriginalInvocation(), true) . "\n";
     $invocation->proceed(array('b', 'c', 'd'));
     echo "After\n";
 }