Exemplo n.º 1
0
 /**
  * @param ContextInterface $context
  *
  * @return void
  */
 public function execute(ContextInterface $context)
 {
     try {
         $this->mainAction->execute($context);
     } catch (\Exception $ex) {
         /** @var ExceptionContext $exceptionContext */
         $exceptionContext = $context->getSubContext(ProfileContexts::EXCEPTION, ExceptionContext::class);
         $exceptionContext->addException($ex);
         $this->errorAction->execute($context);
     }
 }
Exemplo n.º 2
0
 /**
  * @param int $depth
  *
  * @return array
  */
 public function debugPrintTree($depth = 0)
 {
     $arr = array();
     if ($this->assertionAction instanceof DebugPrintTreeActionInterface) {
         $arr = array_merge($arr, $this->assertionAction->debugPrintTree());
     } else {
         $arr[get_class($this->assertionAction)] = array();
     }
     $result = array(static::class => $arr);
     return $result;
 }
Exemplo n.º 3
0
 /**
  * @param ContextInterface $context
  *
  * @return void
  */
 public function execute(ContextInterface $context)
 {
     $this->beforeAction($context);
     $this->action->execute($context);
     $this->afterAction($context);
 }