Пример #1
0
 public function ResponsesOnlyXMLArchiveAction()
 {
     $session = new Zend_Session_Namespace('login');
     $instance = new InstanceModel(array('instanceID' => $session->dataInstanceID, 'depth' => 'instance'));
     $zip = new ZipArchiveModel($instance, array('new' => 1));
     $zip->addInstanceResponsesXMLDocument();
     $zip->addAttachments();
     $zip->close();
     $cryptoID = $this->_hasParam('cryptoID') ? $this->_getParam('cryptoID') : null;
     if (isset($cryptoID) && $cryptoID != 0) {
         $crypto = new CryptoModel(array('cryptoID' => $cryptoID));
         $this->view->archive = $crypto->encrypt($zip->getZipFileContents());
         $this->view->cryptoID = $cryptoID;
     } else {
         $this->view->archive = $zip->getZipFileContents();
     }
     $zip->deleteZipFile();
     $this->view->setRenderLayout(false);
 }