ILIAS
trunk Revision v11.0_alpha-1846-g895b5f47236
|
XML writer class Class to simplify manual writing of xml documents. More...
Public Member Functions | |
setAttachRoles (bool $value) | |
setObjects (array $users) | |
start () | |
getXML () | |
__buildHeader () | |
__buildFooter () | |
__handleUser (array $row) | |
__addElementMulti (string $tagname, array $value, ?array $attrs=null, ?string $settingsname=null, bool $requiredTag=false) | |
__addElement (string $tagname, ?string $value, ?array $attrs=null, ?string $settingsname=null, bool $requiredTag=false) | |
setSettings (array $settings) | |
setAttachPreferences (bool $attach_preferences) | |
if set to true, all preferences of a user will be set More... | |
![]() | |
__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... | |
Static Public Member Functions | |
static | getExportablePreferences () |
return exportable preference keys as found in db More... | |
static | isPrefExportable (string $key) |
returns wether a key from db is exportable or not More... | |
Private Member Functions | |
__handlePreferences (array $prefs, array $row) | |
canExport (string $tagname, ?string $settingsname=null) | |
getPictureValue (int $usr_id) | |
return array with base-encoded picture data as key value, encoding type as encoding, and image type as key type. More... | |
Private Attributes | |
ILIAS | $ilias |
ilDBInterface | $db |
Language | $lng |
array | $users |
int | $user_id = 0 |
bool | $attach_roles = false |
bool | $attach_preferences = false |
array | $settings = [] |
fields to be exported More... | |
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 30 of file class.ilUserXMLWriter.php.
ilUserXMLWriter::__addElement | ( | string | $tagname, |
?string | $value, | ||
?array | $attrs = null , |
||
?string | $settingsname = null , |
||
bool | $requiredTag = false |
||
) |
Definition at line 290 of file class.ilUserXMLWriter.php.
References canExport(), null, and ilXmlWriter\xmlElement().
Referenced by __addElementMulti(), and __handleUser().
ilUserXMLWriter::__addElementMulti | ( | string | $tagname, |
array | $value, | ||
?array | $attrs = null , |
||
?string | $settingsname = null , |
||
bool | $requiredTag = false |
||
) |
Definition at line 278 of file class.ilUserXMLWriter.php.
References __addElement().
Referenced by __handleUser().
ilUserXMLWriter::__buildFooter | ( | ) |
Definition at line 107 of file class.ilUserXMLWriter.php.
References ilXmlWriter\xmlEndTag().
Referenced by start().
ilUserXMLWriter::__buildHeader | ( | ) |
Definition at line 98 of file class.ilUserXMLWriter.php.
References ilXmlWriter\xmlHeader(), ilXmlWriter\xmlSetDtdDef(), ilXmlWriter\xmlSetGenCmt(), and ilXmlWriter\xmlStartTag().
Referenced by start().
|
private |
Definition at line 260 of file class.ilUserXMLWriter.php.
References ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
Referenced by __handleUser().
ilUserXMLWriter::__handleUser | ( | array | $row | ) |
Definition at line 112 of file class.ilUserXMLWriter.php.
References __addElement(), __addElementMulti(), __handlePreferences(), ilObjUser\_getPreferences(), canExport(), ilDBConstants\FETCHMODE_ASSOC, ilObjUserFolder\getExportSettings(), getPictureValue(), IL_INST_ID, ILIAS\Repository\lng(), null, ROLE_FOLDER_ID, setSettings(), ILIAS\Repository\settings(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
Referenced by start().
|
private |
Definition at line 305 of file class.ilUserXMLWriter.php.
References ILIAS\Repository\settings().
Referenced by __addElement(), and __handleUser().
|
static |
return exportable preference keys as found in db
Definition at line 356 of file class.ilUserXMLWriter.php.
|
private |
return array with base-encoded picture data as key value, encoding type as encoding, and image type as key type.
Definition at line 323 of file class.ilUserXMLWriter.php.
References null.
Referenced by __handleUser().
ilUserXMLWriter::getXML | ( | ) |
Definition at line 92 of file class.ilUserXMLWriter.php.
References ilXmlWriter\xmlDumpMem().
|
static |
returns wether a key from db is exportable or not
Definition at line 396 of file class.ilUserXMLWriter.php.
Referenced by ilUserImportParser\importEndTag(), and ilUserImportParser\verifyPref().
ilUserXMLWriter::setAttachPreferences | ( | bool | $attach_preferences | ) |
if set to true, all preferences of a user will be set
Definition at line 348 of file class.ilUserXMLWriter.php.
References $attach_preferences.
ilUserXMLWriter::setAttachRoles | ( | bool | $value | ) |
Definition at line 61 of file class.ilUserXMLWriter.php.
ilUserXMLWriter::setObjects | ( | array | $users | ) |
ilUserXMLWriter::setSettings | ( | array | $settings | ) |
Definition at line 314 of file class.ilUserXMLWriter.php.
References $settings, and ILIAS\Repository\settings().
Referenced by __handleUser().
ilUserXMLWriter::start | ( | ) |
Definition at line 72 of file class.ilUserXMLWriter.php.
References __buildFooter(), __buildHeader(), __handleUser(), and ilUserDefinedFields\_getInstance().
|
private |
Definition at line 38 of file class.ilUserXMLWriter.php.
Referenced by setAttachPreferences().
|
private |
Definition at line 37 of file class.ilUserXMLWriter.php.
|
private |
Definition at line 33 of file class.ilUserXMLWriter.php.
|
private |
Definition at line 32 of file class.ilUserXMLWriter.php.
|
private |
Definition at line 34 of file class.ilUserXMLWriter.php.
|
private |
fields to be exported
Definition at line 44 of file class.ilUserXMLWriter.php.
Referenced by setSettings().
|
private |
Definition at line 36 of file class.ilUserXMLWriter.php.
|
private |
Definition at line 35 of file class.ilUserXMLWriter.php.
Referenced by setObjects().