ILIAS
Release_5_0_x_branch Revision 61816
|
XML writer class. More...
Public Member Functions | |
ilUserXMLWriter () | |
constructor | |
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 | |
setAttachPreferences ($attachPrefs) | |
if set to true, all preferences of a user will be set | |
Public Member Functions inherited from ilXmlWriter | |
ilXmlWriter ($version="1.0", $outEnc="utf-8", $inEnc="utf-8") | |
constructor | |
_ilXmlWriter () | |
destructor public | |
xmlSetDtdDef ($dtdDef) | |
Sets dtd definition. | |
xmlSetStSheet ($stSheet) | |
Sets stylesheet. | |
xmlSetGenCmt ($genCmt) | |
Sets generated comment. | |
_xmlEscapeData ($data) | |
Escapes reserved characters. | |
xmlEncodeData ($data) | |
Encodes text from input encoding into output encoding. | |
xmlFormatData ($data) | |
Indents text for better reading. | |
xmlFormatElement ($array) | |
Callback function for xmlFormatData; do not invoke directly. | |
xmlHeader () | |
Writes xml header public. | |
xmlStartTag ($tag, $attrs=NULL, $empty=FALSE, $encode=TRUE, $escape=TRUE) | |
Writes a starttag. | |
xmlEndTag ($tag) | |
Writes an endtag. | |
xmlComment ($comment) | |
Writes a comment. | |
xmlData ($data, $encode=TRUE, $escape=TRUE) | |
Writes data. | |
xmlElement ($tag, $attrs=NULL, $data=Null, $encode=TRUE, $escape=TRUE) | |
Writes a basic element (no children, just textual content) | |
xmlDumpFile ($file, $format=TRUE) | |
Dumps xml document from memory into a file. | |
xmlDumpMem ($format=TRUE) | |
Returns xml document from memory. | |
appendXML ($a_str) | |
append xml string to document | |
xmlClear () | |
clears xmlStr public |
Static Public Member Functions | |
static | getExportablePreferences () |
return exportable preference keys as found in db | |
static | isPrefExportable ($key) |
returns wether a key from db is exportable or not |
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. |
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::__addElement | ( | $tagname, | |
$value, | |||
$attrs = null , |
|||
$settingsname = null , |
|||
$requiredTag = false |
|||
) |
Definition at line 304 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 293 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 273 of file class.ilUserXMLWriter.php.
References $row, 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(), canExport(), DB_FETCHMODE_ASSOC, ilObjUserFolder\getExportSettings(), getPictureValue(), setSettings(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
Referenced by start().
|
private |
Definition at line 312 of file class.ilUserXMLWriter.php.
Referenced by __addElement(), and __handleUser().
|
static |
return exportable preference keys as found in db
Definition at line 386 of file class.ilUserXMLWriter.php.
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 333 of file class.ilUserXMLWriter.php.
References $ilDB, DB_FETCHMODE_ASSOC, and ilUtil\getWebspaceDir().
Referenced by __handleUser().
ilUserXMLWriter::getXML | ( | ) |
Definition at line 97 of file class.ilUserXMLWriter.php.
References ilXmlWriter\xmlDumpMem().
ilUserXMLWriter::ilUserXMLWriter | ( | ) |
constructor
string | xml version |
string | output encoding |
string | input encoding public |
Definition at line 44 of file class.ilUserXMLWriter.php.
References $ilias, $ilUser, and ilXmlWriter\ilXmlWriter().
|
static |
returns wether a key from db is exportable or not
string | $key |
Definition at line 425 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 376 of file class.ilUserXMLWriter.php.
ilUserXMLWriter::setAttachRoles | ( | $value | ) |
Definition at line 62 of file class.ilUserXMLWriter.php.
ilUserXMLWriter::setObjects | ( | & | $users | ) |
Definition at line 67 of file class.ilUserXMLWriter.php.
References $users.
ilUserXMLWriter::setSettings | ( | $settings | ) |
write access to settings
array | $settings |
Definition at line 324 of file class.ilUserXMLWriter.php.
References $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 ilUserXMLWriter().
|
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.