Tolerance\Operation\Callback::call PHP Method

call() public method

public call ( ) : mixed
return mixed
    public function call()
    {
        $callable = $this->callable;
        $this->result = $callable();
        return $this->result;
    }

Usage Example

Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function intercept(MethodInvocation $invocation)
 {
     $operation = new Callback(function () use($invocation) {
         return $invocation->proceed();
     });
     if (null === ($runner = $this->runnerRepository->getRunnerByMethod($invocation->reflection))) {
         return $operation->call();
     }
     return $runner->run($operation);
 }
All Usage Examples Of Tolerance\Operation\Callback::call