5include_once 
"./Services/Xml/classes/class.ilXmlWriter.php";
 
   57        parent::__construct();
 
   75        $this->omit_header = $a_val;
 
   98        $this->target_dir_relative = $a_rel;
 
   99        $this->target_dir_absolute = $a_abs;
 
  127            "obj_id" => 
"il_" . IL_INST_ID . 
"_file_" . $this->file->getId(),
 
  128            "version" => $this->file->getVersion(),
 
  129            "max_version" => $this->file->getMaxVersion(),
 
  130            "size" => $this->file->getFileSize(),
 
  131            "type" => $this->file->getFileType(),
 
  132            "action" => $this->file->getAction(),
 
  136        $this->
xmlElement(
"Filename", 
null, $this->file->getFileName());
 
  138        $this->
xmlElement(
"Title", 
null, $this->file->getTitle());
 
  139        $this->
xmlElement(
"Description", 
null, $this->file->getDescription());
 
  140        $this->
xmlElement(
"Rating", 
null, (
int) $this->file->hasRating());
 
  142        include_once(
"./Services/History/classes/class.ilHistory.php");
 
  144        $versions = $this->file->getVersions();
 
  146        if (count($versions)) {
 
  152                    "max_version" => 
$version[
"max_version"],
 
  154                    "usr_id" => 
"il_" . IL_INST_ID . 
"_usr_" . 
$version[
"user_id"],
 
  156                    "rollback_version" => 
$version[
"rollback_version"],
 
  157                    "rollback_user_id" => 
$version[
"rollback_user_id"],
 
  162                if ($this->attachFileContents) {
 
  163                    $filename = $this->file->getDirectory(
$version[
"version"]) . 
"/" . $this->file->getFileName();
 
  167                            $attribs [
"mode"] = 
"COPY";
 
  168                            $content = 
"/" . 
$version[
"version"] . 
"_" . $this->file->getFileName();
 
  169                            copy(
$filename, $this->target_dir_absolute . $content);
 
  170                            $content = $this->target_dir_relative . $content;
 
  173                            $attribs [
'mode'] = 
"REST";
 
  174                            include_once 
'./Services/WebServices/Rest/classes/class.ilRestFileStorage.php';
 
  176                            $content = $fs->storeFileForRest(base64_encode(@file_get_contents(
$filename)));
 
  180                            $content = @file_get_contents(
$filename);
 
  181                            $attribs [
"mode"] = 
"PLAIN";
 
  183                                $attribs [
"mode"] = 
"ZLIB";
 
  184                                $content = @gzcompress($content, 9);
 
  186                                $attribs [
"mode"] = 
"GZIP";
 
  187                                $content = @gzencode($content, 9);
 
  189                            $content = base64_encode($content);
 
  194                $this->
xmlElement(
"Version", $attribs, $content);
 
  216            $this->
xmlSetDtdDef(
"<!DOCTYPE File PUBLIC \"-//ILIAS//DTD FileAdministration//EN\" \"" . ILIAS_HTTP_PATH . 
"/xml/ilias_file_3_8.dtd\">");
 
An exception for terminatinating execution or to throw for unit testing.
Class to report exception.
static $ID_DEFLATE_METHOD_MISMATCH
static $CONTENT_ATTACH_GZIP_ENCODED
setAttachFileContents($attachFileContents)
set attachment content mode
static $CONTENT_ATTACH_REST
setFileTargetDirectories($a_rel, $a_abs)
Set file target directories.
setOmitHeader($a_val)
Set omit header.
static $CONTENT_ATTACH_COPY
static $CONTENT_ATTACH_ENCODED
getOmitHeader()
Get omit header.
static $CONTENT_ATTACH_NO
static $CONTENT_ATTACH_ZLIB_ENCODED
static date_mysql2time($mysql_date_time)
make time object from mysql_date_time
xmlEndTag($tag)
Writes an endtag.
xmlSetGenCmt($genCmt)
Sets generated comment.
xmlDumpMem($format=true)
Returns xml document from memory.
xmlHeader()
Writes xml header @access public.
xmlElement($tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
xmlSetDtdDef($dtdDef)
Sets dtd definition.