public function onMasterRequest(MasterRequestEvent $event)
 {
     if ($event->getResponse() || $event->getBatchRequest()) {
         return;
     }
     if ($batchRequest = $this->parseBatchRequest($event->getMasterRequest())) {
         $event->setBatchRequest($batchRequest);
     }
 }
예제 #2
0
 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());
     }
 }
예제 #3
0
 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);
             }
         }
     }
 }