/** * Save our results. Tearing down and unsetting the Wizard is handled by * in {@link runWizard()} and does not need to be implemented here. * * @param string $cacheName * @return boolean TRUE if save was successful and tear-down/cleanup of the * Wizard should ensue. * @access public * @since 4/28/05 */ function saveWizard($cacheName) { $wizard = $this->getWizard($cacheName); $properties = $wizard->getAllValues(); // instantiate new exporter $exporter = XMLExporter::withCompression($properties['compression']); // export all of concerto to this location $dir = $exporter->exportAll(); $this->_archiveFile = $exporter->compressWithStatus(); $this->_archiveFileKey = str_replace('.', '', basename($this->_archiveFile, $properties['compression'])); // printpre($this->_archiveFile); // For security, only files listed in the following array will be allowed // to be downloaded. if (!isset($_SESSION['EXPORTED_FILES'])) { $_SESSION['EXPORTED_FILES'] = array(); } $_SESSION['EXPORTED_FILES'][$this->_archiveFileKey] = array('file' => $this->_archiveFile, 'name' => basename($properties['filepath'] . $properties['compression']), 'mime' => 'application/x-gzip'); return TRUE; }
/** * Constructor for starting an export * * @param string * @param string * @access public * @since 10/31/05 * @static */ static function withCompression($compression, $class = 'XMLRepositoryExporter') { return parent::withCompression($compression, $class); }
/** * Constructor for starting an export * * @param string * @param string * @access public * @since 10/31/05 * @static */ static function withCompression($compression, $class = 'XMLAssetExporter') { return parent::withCompression($compression, $class); }
<?php /** @var eZModule $Module */ $Module = $Params['Module']; $ParentNodeID = isset($Params['ParentNodeID']) ? $Params['ParentNodeID'] : false; $ClassIdentifier = isset($Params['ClassIdentifier']) ? $Params['ClassIdentifier'] : false; $UserParameters = $Params['UserParameters']; try { $XMLExporter = new XMLExporter($ParentNodeID, $ClassIdentifier); $XMLExporter->setUserParameter($UserParameters); $XMLExporter->setModule($Module); } catch (InvalidArgumentException $e) { eZDebug::writeError($e->getMessage(), __FILE__); return $Module->handleError(eZError::KERNEL_NOT_FOUND, 'kernel'); } catch (Exception $e) { eZDebug::writeError($e->getMessage(), __FILE__); return $Module->handleError(eZError::KERNEL_ACCESS_DENIED, 'kernel'); } ob_get_clean(); //chiudo l'ob_start del'index.php $XMLExporter->handleDownload(); eZExecution::cleanExit();
function transformNode(eZContentObjectTreeNode $node) { if ($node instanceof eZContentObjectTreeNode) { $object = $node->attribute('object'); self::$recursion = 0; $this->transformObject($object, $node); } }