Ejemplo n.º 1
0
 protected function setupJsonResponseHandler()
 {
     if (!empty($this->jsonHandlerConfig['show_trace'])) {
         $this->jsonHandler->addTraceToOutput(true);
     }
     if (!empty($this->jsonHandlerConfig['ajax_only'])) {
         $this->jsonHandler->onlyForAjaxRequests(true);
     }
     if (!empty($this->jsonHandlerConfig['context_based_only']) && method_exists($this->jsonHandler, 'onlyForJsonRequests')) {
         $this->jsonHandler->onlyForJsonRequests(true);
     }
     $this->run->pushHandler($this->jsonHandler);
 }