4include_once 
'./Services/Export/classes/class.ilExportFileInfo.php';
 
    5include_once 
'./Services/Export/classes/class.ilExport.php';
 
   41    public function exportObject($a_type, $a_id, $a_target_release = 
"")
 
   46        if ($a_target_release == 
"") {
 
   48            $a_target_release = $v[0] . 
"." . $v[1] . 
".0";
 
   55        $sub_dir = $ts . 
"__" . 
IL_INST_ID . 
"__" . $a_type . 
"_" . $a_id;
 
   57        $this->cont_export_dir = $export_dir . DIRECTORY_SEPARATOR . $sub_dir;
 
   60        $log->debug(
'Using base directory: ' . $this->export_run_dir);
 
   64        $this->
addSubitems($a_id, $a_type, $a_target_release);
 
   67        ilUtil::zip($this->cont_export_dir, $this->cont_export_dir . 
'.zip');
 
   77        include_once 
"./Services/Xml/classes/class.ilXmlWriter.php";
 
   79        $this->cont_manifest_writer->xmlHeader();
 
   80        $this->cont_manifest_writer->xmlStartTag(
 
   83                "MainEntity" => $a_type,
 
   87                "InstallationUrl" => ILIAS_HTTP_PATH)
 
  113        foreach ($this->eo->getSubitemsForExport() as $ref_id) {
 
  120                $this->log->warning(
'Cannot find export file for refId ' . $ref_id . 
', type ' . 
ilObject::_lookupType($a_id));
 
  125            $exp_full = $exp_dir . DIRECTORY_SEPARATOR . $expi->getFilename();
 
  127            $this->log->debug(
'Zip path ' . $exp_full);
 
  136            $new_path_rel = 
'set_' . $set_number . DIRECTORY_SEPARATOR . $expi->getBasename();
 
  137            $new_path_abs = $this->cont_export_dir . DIRECTORY_SEPARATOR . $new_path_rel;
 
  139            $this->log->debug($new_path_rel . 
' ' . $new_path_abs);
 
  143                $exp_dir . DIRECTORY_SEPARATOR . $expi->getBasename(),
 
  147            $this->log->debug($exp_dir . DIRECTORY_SEPARATOR . $expi->getBasename() . 
' -> ' . $new_path_abs);
 
  150            if ($a_id == $obj_id) {
 
  152                if (file_exists($exp_full)) {
 
  153                    $this->log->info(
'Deleting' . $exp_full);
 
  158            $this->cont_manifest_writer->xmlElement(
 
  161                    'Path' => $new_path_rel,
 
  180        $this->cont_manifest_writer->xmlEndTag(
'Manifest');
 
  181        $this->log->debug($this->cont_export_dir . DIRECTORY_SEPARATOR . 
'manifest.xml');
 
  182        $this->cont_manifest_writer->xmlDumpFile($this->cont_export_dir . DIRECTORY_SEPARATOR . 
'manifest.xml', 
true);
 
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
manifestWriterBegin($a_type, $a_id, $a_target_release)
Write container manifest.
addSubitems($a_id, $a_type, $a_target_release)
Add subitems.
exportObject($a_type, $a_id, $a_target_release="")
Export a container.
manifestWriterEnd($a_type, $a_id, $a_target_release)
Write manifest footer.
__construct(ilExportOptions $eo)
Constructor.
addContainer()
Add container description.
@classDescription Stores information of creation date and versions of export files
static lookupLastExport($a_obj_id, $a_type, $a_version='')
Lookup last export.
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
static _createExportDirectory($a_obj_id, $a_export_type="xml", $a_obj_type="")
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
static unzip(string $path_to_zip_file, bool $overwrite_existing=false, bool $unpack_flat=false)
static makeDirParents($a_dir)
Create a new directory and all parent directories.
const ILIAS_VERSION_NUMERIC
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc