public function onMasterRequest(MasterRequestEvent $event)
 {
     if ($event->getResponse() || $event->getBatchRequest()) {
         return;
     }
     if ($batchRequest = $this->parseBatchRequest($event->getMasterRequest())) {
         $event->setBatchRequest($batchRequest);
     }
 }
 public function onMasterRequest(MasterRequestEvent $event)
 {
     if ($event->getResponse() || $event->getBatchRequest()) {
         return;
     }
     $request = $event->getMasterRequest();
     if ('GET' == $request->getMethod() && 'echo' == $request->query->get('ext')) {
         $event->setResponse($this->getEchoResponse());
     }
 }
 public function onMasterRequest(MasterRequestEvent $event)
 {
     if ($event->getResponse() || $event->getBatchRequest()) {
         return;
     }
     $request = $event->getMasterRequest();
     if ('GET' == $request->getMethod() && 'api' == $request->query->get('ext')) {
         $event->setResponse($this->getApiResponse($request->getUriForPath($request->getPathInfo())));
     }
 }
 public function onMasterRequest(MasterRequestEvent $event)
 {
     if ($event->getBatchRequest() || $event->getResponse()) {
         return;
     }
     $request = $event->getMasterRequest();
     if (false == ('GET' == $request->getMethod() && 'api' == $request->query->get('ext'))) {
         return;
     }
     foreach ($this->serviceManager->all() as $serviceName => $methods) {
         foreach ($methods as $methodName => $callback) {
             $parameters = $this->serviceManager->getParameters($serviceName, $methodName);
             if (false !== $this->getFormArgumentPosition($parameters)) {
                 $this->serviceManager->markFormHandler($serviceName, $methodName);
             }
         }
     }
 }