ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
XML writer class. More...
Public Member Functions | |
__construct () | |
constructor More... | |
setAttachRoles ($value) | |
setObjects (& $users) | |
start () | |
getXML () | |
__buildHeader () | |
__buildFooter () | |
__handleUser ($row) | |
__addElementMulti ($tagname, $value, $attrs=null, $settingsname=null, $requiredTag=false) | |
__addElement ($tagname, $value, $attrs=null, $settingsname=null, $requiredTag=false) | |
setSettings ($settings) | |
write access to settings More... | |
setAttachPreferences ($attachPrefs) | |
if set to true, all preferences of a user will be set More... | |
Public Member Functions inherited from ilXmlWriter | |
__construct ($version="1.0", $outEnc="utf-8", $inEnc="utf-8") | |
constructor More... | |
_ilXmlWriter () | |
destructor public More... | |
xmlSetDtdDef ($dtdDef) | |
Sets dtd definition. More... | |
xmlSetStSheet ($stSheet) | |
Sets stylesheet. More... | |
xmlSetGenCmt ($genCmt) | |
Sets generated comment. More... | |
xmlEncodeData ($data) | |
Encodes text from input encoding into output encoding. More... | |
xmlFormatData ($data) | |
Indents text for better reading. More... | |
xmlFormatElement ($array) | |
Callback function for xmlFormatData; do not invoke directly. More... | |
xmlHeader () | |
Writes xml header public. More... | |
xmlStartTag ($tag, $attrs=NULL, $empty=FALSE, $encode=TRUE, $escape=TRUE) | |
Writes a starttag. More... | |
xmlEndTag ($tag) | |
Writes an endtag. More... | |
xmlComment ($comment) | |
Writes a comment. More... | |
xmlData ($data, $encode=TRUE, $escape=TRUE) | |
Writes data. More... | |
xmlElement ($tag, $attrs=NULL, $data=Null, $encode=TRUE, $escape=TRUE) | |
Writes a basic element (no children, just textual content) More... | |
xmlDumpFile ($file, $format=TRUE) | |
Dumps xml document from memory into a file. More... | |
xmlDumpMem ($format=TRUE) | |
Returns xml document from memory. More... | |
appendXML ($a_str) | |
append xml string to document More... | |
xmlClear () | |
clears xmlStr public More... | |
Static Public Member Functions | |
static | getExportablePreferences () |
return exportable preference keys as found in db More... | |
static | isPrefExportable ($key) |
returns wether a key from db is exportable or not More... | |
Static Public Member Functions inherited from ilXmlWriter | |
static | _xmlEscapeData ($data) |
Escapes reserved characters. More... | |
Data Fields | |
$ilias | |
$xml | |
$users | |
$user_id = 0 | |
$attachRoles = false | |
$attachPreferences = false | |
Data Fields inherited from ilXmlWriter | |
$xmlStr | |
$version | |
$outEnc | |
$inEnc | |
$dtdDef = "" | |
$stSheet = "" | |
$genCmt = "Generated by ILIAS XmlWriter" | |
Private Member Functions | |
__handlePreferences ($prefs, $row) | |
canExport ($tagname, $settingsname=null) | |
getPictureValue ($usr_id) | |
return array with baseencoded picture data as key value, encoding type as encoding, and image type as key type. More... | |
Private Attributes | |
$settings | |
Static Private Attributes | |
static | $exportablePrefs |
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 20 of file class.ilUserXMLWriter.php.
ilUserXMLWriter::__construct | ( | ) |
constructor
string | xml version |
string | output encoding |
string | input encoding public |
Definition at line 44 of file class.ilUserXMLWriter.php.
References $ilias, and $ilUser.
ilUserXMLWriter::__addElement | ( | $tagname, | |
$value, | |||
$attrs = null , |
|||
$settingsname = null , |
|||
$requiredTag = false |
|||
) |
Definition at line 302 of file class.ilUserXMLWriter.php.
References canExport(), and ilXmlWriter\xmlElement().
Referenced by __addElementMulti(), and __handleUser().
ilUserXMLWriter::__addElementMulti | ( | $tagname, | |
$value, | |||
$attrs = null , |
|||
$settingsname = null , |
|||
$requiredTag = false |
|||
) |
Definition at line 291 of file class.ilUserXMLWriter.php.
References __addElement().
Referenced by __handleUser().
ilUserXMLWriter::__buildFooter | ( | ) |
Definition at line 114 of file class.ilUserXMLWriter.php.
References ilXmlWriter\xmlEndTag().
Referenced by start().
ilUserXMLWriter::__buildHeader | ( | ) |
Definition at line 103 of file class.ilUserXMLWriter.php.
References ilXmlWriter\xmlHeader(), ilXmlWriter\xmlSetDtdDef(), ilXmlWriter\xmlSetGenCmt(), and ilXmlWriter\xmlStartTag().
Referenced by start().
|
private |
Definition at line 271 of file class.ilUserXMLWriter.php.
References $row, array, isPrefExportable(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
Referenced by __handleUser().
ilUserXMLWriter::__handleUser | ( | $row | ) |
Definition at line 119 of file class.ilUserXMLWriter.php.
References $ilDB, $lng, $query, $row, __addElement(), __addElementMulti(), __handlePreferences(), ilObjUser\_getPreferences(), array, canExport(), ilDBConstants\FETCHMODE_ASSOC, ilObjUserFolder\getExportSettings(), getPictureValue(), setSettings(), settings(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
Referenced by start().
|
private |
Definition at line 313 of file class.ilUserXMLWriter.php.
References settings().
Referenced by __addElement(), and __handleUser().
|
static |
return exportable preference keys as found in db
Definition at line 387 of file class.ilUserXMLWriter.php.
References array.
Referenced by isPrefExportable().
|
private |
return array with baseencoded picture data as key value, encoding type as encoding, and image type as key type.
int | $usr_id |
Definition at line 334 of file class.ilUserXMLWriter.php.
References $fh, $ilDB, $r, array, ilDBConstants\FETCHMODE_ASSOC, and ilUtil\getWebspaceDir().
Referenced by __handleUser().
ilUserXMLWriter::getXML | ( | ) |
Definition at line 97 of file class.ilUserXMLWriter.php.
References ilXmlWriter\xmlDumpMem().
|
static |
returns wether a key from db is exportable or not
string | $key |
Definition at line 428 of file class.ilUserXMLWriter.php.
References getExportablePreferences().
Referenced by __handlePreferences(), ilUserImportParser\importEndTag(), and ilUserImportParser\verifyPref().
ilUserXMLWriter::setAttachPreferences | ( | $attachPrefs | ) |
if set to true, all preferences of a user will be set
bool | $attachPrefs |
Definition at line 377 of file class.ilUserXMLWriter.php.
ilUserXMLWriter::setAttachRoles | ( | $value | ) |
Definition at line 62 of file class.ilUserXMLWriter.php.
ilUserXMLWriter::setObjects | ( | & | $users | ) |
ilUserXMLWriter::setSettings | ( | $settings | ) |
write access to settings
array | $settings |
Definition at line 325 of file class.ilUserXMLWriter.php.
References $settings, and settings().
Referenced by __handleUser().
ilUserXMLWriter::start | ( | ) |
Definition at line 73 of file class.ilUserXMLWriter.php.
References __buildFooter(), __buildHeader(), __handleUser(), and ilUserDefinedFields\_getInstance().
ilUserXMLWriter::$attachPreferences = false |
Definition at line 27 of file class.ilUserXMLWriter.php.
ilUserXMLWriter::$attachRoles = false |
Definition at line 26 of file class.ilUserXMLWriter.php.
|
staticprivate |
Definition at line 28 of file class.ilUserXMLWriter.php.
ilUserXMLWriter::$ilias |
Definition at line 22 of file class.ilUserXMLWriter.php.
Referenced by __construct().
|
private |
Definition at line 35 of file class.ilUserXMLWriter.php.
Referenced by setSettings().
ilUserXMLWriter::$user_id = 0 |
Definition at line 25 of file class.ilUserXMLWriter.php.
ilUserXMLWriter::$users |
Definition at line 24 of file class.ilUserXMLWriter.php.
Referenced by setObjects().
ilUserXMLWriter::$xml |
Definition at line 23 of file class.ilUserXMLWriter.php.