src/wcmf/lib/presentation/impl/DefaultRequestListener.php
public function listen(ApplicationEvent $event) {
    if ($event->getStage() == ApplicationEvent::BEFORE_ROUTE_ACTION) {
      $request = $event->getRequest();
      if ($request != null) {
        $this->transformRequest($request);
      }
    }
    else if ($event->getStage() == ApplicationEvent::AFTER_EXECUTE_CONTROLLER) {
      $request = $event->getRequest();
      $response = $event->getResponse();
      if ($request != null && $response != null) {
        $this->transformResponse($request, $response);
      }
    }
  }
public function listen(ApplicationEvent $event) {
    if ($event->getStage() == ApplicationEvent::BEFORE_ROUTE_ACTION) {
      $request = $event->getRequest();
      if ($request != null) {
        $this->transformRequest($request);
      }
    }
    else if ($event->getStage() == ApplicationEvent::AFTER_EXECUTE_CONTROLLER) {
      $request = $event->getRequest();
      $response = $event->getResponse();
      if ($request != null && $response != null) {
        $this->transformResponse($request, $response);
      }
    }
  }
public function listen ( ApplicationEvent $ event ) { if ( $ event -> getStage ( ) == ApplicationEvent :: BEFORE_ROUTE_ACTION ) { $ request = $ event -> getRequest ( ) ; if ( $ request != null ) { $ this -> transformRequest ( $ request ) ; } } else if ( $ event -> getStage ( ) == ApplicationEvent :: AFTER_EXECUTE_CONTROLLER ) { $ request = $ event -> getRequest ( ) ; $ response = $ event -> getResponse ( ) ; if ( $ request != null && $ response != null ) { $ this -> transformResponse ( $ request , $ response ) ; } } }
Listen to ApplicationEvent
@param $event ApplicationEvent instance
Listen to ApplicationEvent