ILIAS
trunk Revision v11.0_alpha-1861-g09f3d197f78
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
__construct () | |
constructor More... | |
setFile (ilObjFile $file) | |
setOmitHeader ($a_val) | |
Set omit header. More... | |
getOmitHeader () | |
Get omit header. More... | |
setFileTargetDirectories (?string $a_rel, ?string $a_abs) | |
Set file target directories. More... | |
setAttachFileContents (int $attachFileContents) | |
set attachment content mode More... | |
start () | |
getXML () | |
__buildHeader () | |
__buildFooter () | |
![]() | |
__construct (string $version="1.0", string $outEnc="utf-8", string $inEnc="utf-8") | |
xmlSetDtdDef (string $dtdDef) | |
Sets dtd definition. More... | |
xmlSetGenCmt (string $genCmt) | |
Sets generated comment. More... | |
xmlFormatData (string $data) | |
Indents text for better reading. More... | |
xmlHeader () | |
Writes xml header. More... | |
xmlStartTag (string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true) | |
Writes a starttag. More... | |
xmlEndTag (string $tag) | |
Writes an endtag. More... | |
xmlData (string $data, bool $encode=true, bool $escape=true) | |
Writes data. More... | |
xmlElement (string $tag, $attrs=null, $data=null, $encode=true, $escape=true) | |
Writes a basic element (no children, just textual content) More... | |
xmlDumpFile (string $file, bool $format=true) | |
Dumps xml document from memory into a file. More... | |
xmlDumpMem (bool $format=true) | |
Returns xml document from memory. More... | |
appendXML (string $a_str) | |
append xml string to document More... | |
xmlClear () | |
clears xmlStr More... | |
Data Fields | |
int | $attachFileContents |
ilObjFile | $file |
Exercise Object. More... | |
$omit_header = false | |
Static Public Attributes | |
static int | $CONTENT_ATTACH_NO = 0 |
static int | $CONTENT_ATTACH_ENCODED = 1 |
static int | $CONTENT_ATTACH_ZLIB_ENCODED = 2 |
static int | $CONTENT_ATTACH_GZIP_ENCODED = 3 |
static int | $CONTENT_ATTACH_COPY = 4 |
static int | $CONTENT_ATTACH_REST = 5 |
Protected Attributes | |
string | $target_dir_relative = null |
string | $target_dir_absolute = null |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning XML writer class
Class to simplify manual writing of xml documents. It only supports writing xml sequentially, because the xml document is saved in a string with no additional structure information. The author is responsible for well-formedness and validity of the xml document.
\
Definition at line 33 of file class.ilFileXMLWriter.php.
ilFileXMLWriter::__construct | ( | ) |
constructor
string | xml version |
string | output encoding |
string | input encoding |
public
Definition at line 65 of file class.ilFileXMLWriter.php.
References $CONTENT_ATTACH_NO, and ILIAS\GlobalScreen\Provider\__construct().
ilFileXMLWriter::__buildFooter | ( | ) |
Definition at line 230 of file class.ilFileXMLWriter.php.
Referenced by start().
ilFileXMLWriter::__buildHeader | ( | ) |
Definition at line 217 of file class.ilFileXMLWriter.php.
References getOmitHeader(), ilXmlWriter\xmlHeader(), ilXmlWriter\xmlSetDtdDef(), and ilXmlWriter\xmlSetGenCmt().
Referenced by start().
ilFileXMLWriter::getOmitHeader | ( | ) |
Get omit header.
Definition at line 91 of file class.ilFileXMLWriter.php.
References $omit_header.
Referenced by __buildHeader().
ilFileXMLWriter::getXML | ( | ) |
Definition at line 212 of file class.ilFileXMLWriter.php.
References ilXmlWriter\xmlDumpMem().
ilFileXMLWriter::setAttachFileContents | ( | int | $attachFileContents | ) |
set attachment content mode
ilExerciseException | if mode is not supported |
Definition at line 114 of file class.ilFileXMLWriter.php.
References $attachFileContents, $CONTENT_ATTACH_GZIP_ENCODED, $CONTENT_ATTACH_ZLIB_ENCODED, and ilFileException\$ID_DEFLATE_METHOD_MISMATCH.
ilFileXMLWriter::setFile | ( | ilObjFile | $file | ) |
ilFileXMLWriter::setFileTargetDirectories | ( | ?string | $a_rel, |
?string | $a_abs | ||
) |
Set file target directories.
string | relative file target directory |
string | absolute file target directory |
Definition at line 102 of file class.ilFileXMLWriter.php.
Referenced by ilFileExporter\prepareExportDirectories().
ilFileXMLWriter::setOmitHeader | ( | $a_val | ) |
Set omit header.
boolean | omit header |
Definition at line 81 of file class.ilFileXMLWriter.php.
ilFileXMLWriter::start | ( | ) |
Definition at line 131 of file class.ilFileXMLWriter.php.
References $CONTENT_ATTACH_COPY, $CONTENT_ATTACH_GZIP_ENCODED, $CONTENT_ATTACH_REST, $CONTENT_ATTACH_ZLIB_ENCODED, $filename, ilXmlWriter\$version, __buildFooter(), __buildHeader(), IL_INST_ID, null, ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
int ilFileXMLWriter::$attachFileContents |
Definition at line 44 of file class.ilFileXMLWriter.php.
Referenced by setAttachFileContents().
|
static |
Definition at line 39 of file class.ilFileXMLWriter.php.
Referenced by ilFileExporter\getXmlRepresentation(), and start().
|
static |
Definition at line 36 of file class.ilFileXMLWriter.php.
|
static |
Definition at line 38 of file class.ilFileXMLWriter.php.
Referenced by setAttachFileContents(), and start().
|
static |
Definition at line 35 of file class.ilFileXMLWriter.php.
Referenced by __construct().
|
static |
Definition at line 41 of file class.ilFileXMLWriter.php.
Referenced by start().
|
static |
Definition at line 37 of file class.ilFileXMLWriter.php.
Referenced by setAttachFileContents(), and start().
ilObjFile ilFileXMLWriter::$file |
ilFileXMLWriter::$omit_header = false |
Definition at line 52 of file class.ilFileXMLWriter.php.
Referenced by getOmitHeader().
|
protected |
Definition at line 54 of file class.ilFileXMLWriter.php.
|
protected |
Definition at line 53 of file class.ilFileXMLWriter.php.