/** * @return Response\Http */ public function getResponse() { if ($this->_request->isDispatched() && $this->_request->isAjax()) { $this->_response->setHeader('Content-Type', 'application/json, text/xml, text/html; charset=UTF-8', true); } return $this->_response; }
/** * @return bool */ private function _hasScript() { $scriptFile = $this->_scriptPath . $this->_request->getController() . DIRECTORY_SEPARATOR . $this->_request->getAction() . $this->_scriptSuffix; return isset($this->_scriptPath) && isset($this->_scriptSuffix) && file_exists($scriptFile); }