public function CompletedResponsesXMLSchemaDownloadAction() { $session = new Zend_Session_Namespace('login'); $questionnaire = new QuestionnaireModel(array('questionnaireID' => $session->dataQuestionnaireID, 'depth' => 'questionnaire')); $cryptoID = $this->_hasParam('cryptoID') ? $this->_getParam('cryptoID') : null; if (isset($cryptoID) && $cryptoID != 0) { $crypto = new CryptoModel(array('cryptoID' => $cryptoID)); $this->view->xml = $crypto->encrypt($questionnaire->fetchCompletedResponseSchema()); $this->view->cryptoID = $cryptoID; } else { $this->view->xml = $questionnaire->fetchCompletedResponseSchema(); } $this->view->setRenderLayout(false); }