ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSoapInstallationInfoXMLWriter Class Reference
+ Inheritance diagram for ilSoapInstallationInfoXMLWriter:
+ Collaboration diagram for ilSoapInstallationInfoXMLWriter:

Public Member Functions

 ilSoapInstallationInfoXMLWriter ()
 constructor
 setSettings ($settings)
 write access to property settings
 start ()
 addClient ($client)
 end ()
 getXML ()
 setExportAdvancedMetaDataDefinitions ($value)
 write access, if set to true advanced meta data definitions will be exported s well
 setExportUDFDefinitions ($value)
 write access, if set to true, user defined field definitions will be exported as well
- 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

Private Member Functions

 __buildHeader ()
 __buildFooter ()
 __buildClient ($setting)
 create client tag
 __buildInstallationInfo ()

Private Attributes

 $exportAdvMDDefs = false
 $exportUDFDefs = false

Additional Inherited Members

- Data Fields inherited from ilXmlWriter
 $xmlStr
 $version
 $outEnc
 $inEnc
 $dtdDef = ""
 $stSheet = ""
 $genCmt = "Generated by ILIAS XmlWriter"

Detailed Description

Definition at line 8 of file class.ilSoapInstallationInfoXMLWriter.php.

Member Function Documentation

ilSoapInstallationInfoXMLWriter::__buildClient (   $setting)
private

create client tag

Parameters
ilSetting$setting

Definition at line 86 of file class.ilSoapInstallationInfoXMLWriter.php.

References ilAdvancedMDRecord\_getActivatedRecordsByObjectType(), ilAuthUtils\_getActiveAuthModes(), ilAdvancedMDRecord\_getAssignableObjectTypes(), ilAuthUtils\_getAuthModeName(), ilTimeZone\_getDefaultTimeZone(), ilObjStyleSettings\_lookupActivatedStyle(), ilUserDefinedFields\_newInstance(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

Referenced by addClient().

{
$auth_mode_default = strtoupper(ilAuthUtils::_getAuthModeName(array_shift($auth_modes)));
$auth_mode_names = array();
foreach ($auth_modes as $mode) {
$auth_mode_names[] = strtoupper(ilAuthUtils::_getAuthModeName($mode));
}
// determine skins/styles
$skin_styles = array();
$styleDefinition = new ilStyleDefinition();
include_once("./Services/Style/classes/class.ilObjStyleSettings.php");
$templates = $styleDefinition->getAllTemplates();
if (is_array($templates))
{
foreach($templates as $template)
{
// get styles information of template
$styleDef =& new ilStyleDefinition($template["id"]);
$styleDef->startParsing();
$styles = $styleDef->getStyles();
foreach($styles as $style)
{
if (!ilObjStyleSettings::_lookupActivatedStyle($template["id"],$style["id"]))
{
continue;
}
$skin_styles [] = $template["id"].":".$style["id"];
}
}
}
// timezones
include_once('Services/Calendar/classes/class.ilTimeZone.php');
$this->xmlStartTag("Client",
array(
"inst_id" => $setting->get("inst_id"),
"id" => $setting->clientid,
"enabled" => $setting->access == 1 ? "TRUE" : "FALSE",
"default_lang" => $setting->language,
));
$this->xmlElement ("Name", null, $setting->get("inst_name"));
$this->xmlElement ("Description", null, $setting->description);
$this->xmlElement ("Institution", null, $setting->get("inst_institution"));
$this->xmlStartTag("Responsible");
$this->xmlElement ("Firstname", null, $setting->get("admin_firstname"));
$this->xmlElement ("Lastname", null, $setting->get("admin_lastname"));
$this->xmlElement ("Title", null, $setting->get("admin_title"));
$this->xmlElement ("Institution", null, $setting->get("admin_institution"));
$this->xmlElement ("Position", null, $setting->get("admin_position"));
$this->xmlElement ("Email", null, $setting->get("admin_email"));
$this->xmlElement ("Street ", null, $setting->get("admin_street"));
$this->xmlElement ("ZipCode ", null, $setting->get("admin_zipcode"));
$this->xmlElement ("City", null, $setting->get("admin_city"));
$this->xmlElement ("Country", null, $setting->get("admin_country"));
$this->xmlElement ("Phone", null, $setting->get("admin_phone"));
$this->xmlEndTag("Responsible");
$this->xmlStartTag("Settings");
$this->xmlElement("Setting", array("key" => "error_recipient"), $setting->get("error_recipient"));
$this->xmlElement("Setting", array("key" => "feedback_recipient"), $setting->get("feedback_recipient"));
$this->xmlElement("Setting", array("key" => "session_expiration"), $setting->session);
$this->xmlElement("Setting", array("key" => "soap_enabled"), $setting->get("soap_user_administration"));
$this->xmlElement("Setting", array("key" => "authentication_methods"), join(",", $auth_mode_names));
$this->xmlElement("Setting", array("key" => "authentication_default_method"), $auth_mode_default);
$this->xmlElement("Setting", array("key" => "skins"), join(",", $skin_styles));
$this->xmlElement("Setting", array("key" => "default_skin"), $setting->default_skin_style);
$this->xmlElement("Setting", array("key" => "default_timezone"), ilTimeZone::_getDefaultTimeZone());
$this->xmlElement("Setting", array("key" => "default_hits_per_page"), $setting->default_hits_per_page);
$this->xmlElement("Setting", array("key" => "default_show_users_online"), $setting->default_show_users_online);
$this->xmlEndTag("Settings");
if ($this->exportAdvMDDefs)
{
// create advanced meta data record xml
include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordXMLWriter.php';
$record_ids = array();
foreach($record_types as $type) {
foreach ($records as $record){
$record_ids [] = $record->getRecordId();
}
}
$record_ids = array_unique($record_ids);
$this->xmlStartTag('AdvancedMetaDataRecords');
if (count($record_ids) > 0)
{
foreach($record_ids as $record_id)
{
$record_obj = ilAdvancedMDRecord::_getInstanceByrecordId($record_id);
$record_obj->toXML($this);
}
}
$this->xmlEndTag('AdvancedMetaDataRecords');
}
if ($this->exportUDFDefs)
{
// create user defined fields record xml
include_once ("./Services/User/classes/class.ilUserDefinedFields.php");
$udf_data->addToXML($this);
}
$this->xmlEndTag("Client");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSoapInstallationInfoXMLWriter::__buildFooter ( )
private

Definition at line 76 of file class.ilSoapInstallationInfoXMLWriter.php.

References ilXmlWriter\xmlEndTag().

Referenced by end().

{
$this->xmlEndTag('Installation');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSoapInstallationInfoXMLWriter::__buildHeader ( )
private

Definition at line 60 of file class.ilSoapInstallationInfoXMLWriter.php.

References ilSoapFunctions\buildHTTPPath(), ILIAS_VERSION, ilXmlWriter\xmlHeader(), ilXmlWriter\xmlSetDtdDef(), ilXmlWriter\xmlSetGenCmt(), and ilXmlWriter\xmlStartTag().

Referenced by start().

{
// we have to build the http path here since this request is client independent!
$this->xmlSetDtdDef("<!DOCTYPE Installation PUBLIC \"-//ILIAS//DTD Group//EN\" \"".$httpPath ."/xml/ilias_client_3_10.dtd\">");
$this->xmlSetGenCmt("Export of ILIAS clients.");
$this->xmlHeader();
$this->xmlStartTag("Installation",
array (
"version" => ILIAS_VERSION,
"path" => $httpPath,
));
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSoapInstallationInfoXMLWriter::__buildInstallationInfo ( )
private

Definition at line 202 of file class.ilSoapInstallationInfoXMLWriter.php.

References $GLOBALS, ilSoapAdministration\return_bytes(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

Referenced by start().

{
$this->xmlStartTag("Settings");
$this->xmlElement("Setting", array("key" => "default_client"), $GLOBALS['ilIliasIniFile']->readVariable("clients","default"));
$this->xmlElement("Setting", array("key" => "post_max_size"), ilSoapAdministration::return_bytes(ini_get("post_max_size")));
$this->xmlElement("Setting", array("key" => "upload_max_filesize"), ilSoapAdministration::return_bytes(ini_get("upload_max_filesize")));
$this->xmlEndTag("Settings");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSoapInstallationInfoXMLWriter::addClient (   $client)

Definition at line 41 of file class.ilSoapInstallationInfoXMLWriter.php.

References $client, and __buildClient().

{
if (is_object($client))
{
}
}

+ Here is the call graph for this function:

ilSoapInstallationInfoXMLWriter::end ( )

Definition at line 49 of file class.ilSoapInstallationInfoXMLWriter.php.

References __buildFooter(), and ilXmlWriter\xmlEndTag().

{
$this->xmlEndTag("Clients");
$this->__buildFooter();
}

+ Here is the call graph for this function:

ilSoapInstallationInfoXMLWriter::getXML ( )

Definition at line 55 of file class.ilSoapInstallationInfoXMLWriter.php.

References ilXmlWriter\xmlDumpMem().

{
return $this->xmlDumpMem(FALSE);
}

+ Here is the call graph for this function:

ilSoapInstallationInfoXMLWriter::ilSoapInstallationInfoXMLWriter ( )

constructor

Parameters
stringxml version
stringoutput encoding
stringinput encoding public

Definition at line 20 of file class.ilSoapInstallationInfoXMLWriter.php.

References ilXmlWriter\ilXmlWriter().

+ Here is the call graph for this function:

ilSoapInstallationInfoXMLWriter::setExportAdvancedMetaDataDefinitions (   $value)

write access, if set to true advanced meta data definitions will be exported s well

Parameters
boolean$value

Definition at line 216 of file class.ilSoapInstallationInfoXMLWriter.php.

{
$this->exportAdvMDDefs = $value ? true : false;
}
ilSoapInstallationInfoXMLWriter::setExportUDFDefinitions (   $value)

write access, if set to true, user defined field definitions will be exported as well

Parameters
boolean$value

Definition at line 226 of file class.ilSoapInstallationInfoXMLWriter.php.

{
$this->exportUDFDefs = $value ? true: false;
}
ilSoapInstallationInfoXMLWriter::setSettings (   $settings)

write access to property settings

Parameters
array$settingsis an array of ilSetting Objects

Definition at line 30 of file class.ilSoapInstallationInfoXMLWriter.php.

{
$this->settings = $settings;
}
ilSoapInstallationInfoXMLWriter::start ( )

Definition at line 34 of file class.ilSoapInstallationInfoXMLWriter.php.

References __buildHeader(), __buildInstallationInfo(), and ilXmlWriter\xmlStartTag().

{
$this->__buildHeader();
$this->xmlStartTag("Clients");
}

+ Here is the call graph for this function:

Field Documentation

ilSoapInstallationInfoXMLWriter::$exportAdvMDDefs = false
private

Definition at line 10 of file class.ilSoapInstallationInfoXMLWriter.php.

ilSoapInstallationInfoXMLWriter::$exportUDFDefs = false
private

Definition at line 11 of file class.ilSoapInstallationInfoXMLWriter.php.


The documentation for this class was generated from the following file: