original_string: protected function event(HttpException $event, Context $context = null)
      {
          $code = $event->getCode();
          if(isset($this->events[$code])) {
              $context->error = $event;
              $context->response->code = $event->getCode();
              $this->logger->debug('kernel.event: http ' . $code . ' event raised, has callback');
              return $context->forward($this->events[$code], $event);
          }
  
          $this->logger->debug('kernel.event: http ' . $code . ' event raised, no callback');
          throw $event;
      }
code: protected function event(HttpException $event, Context $context = null)
      {
          $code = $event->getCode();
          if(isset($this->events[$code])) {
              $context->error = $event;
              $context->response->code = $event->getCode();
              $this->logger->debug('kernel.event: http ' . $code . ' event raised, has callback');
              return $context->forward($this->events[$code], $event);
          }
  
          $this->logger->debug('kernel.event: http ' . $code . ' event raised, no callback');
          throw $event;
      }
code_tokens: protected function event ( HttpException $ event , Context $ context = null ) { $ code = $ event -> getCode ( ) ; if ( isset ( $ this -> events [ $ code ] ) ) { $ context -> error = $ event ; $ context -> response -> code = $ event -> getCode ( ) ; $ this -> logger -> debug ( 'kernel.event: http ' . $ code . ' event raised, has callback' ) ; return $ context -> forward ( $ this -> events [ $ code ] , $ event ) ; } $ this -> logger -> debug ( 'kernel.event: http ' . $ code . ' event raised, no callback' ) ; throw $ event ; }
docstring: Handle http event
  
  @param HttpException $event
  @param Context $context
  @return Context
  
  @throws HttpException
docstring_tokens: Handle http event