ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilXMLResultSetWriter Class Reference
+ Inheritance diagram for ilXMLResultSetWriter:
+ Collaboration diagram for ilXMLResultSetWriter:

Public Member Functions

 ilXMLResultSetWriter (&$xmlResultSet)
 start ()
 getXML ()
 __appendRow (&$xmlResultSetRow)
 __buildHeader ()
 __buildColSpecs ()
 __buildRows ()
 __buildFooter ()
- 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

Data Fields

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

Detailed Description

Definition at line 38 of file class.ilXMLResultSetWriter.php.

Member Function Documentation

ilXMLResultSetWriter::__appendRow ( $xmlResultSetRow)

Definition at line 74 of file class.ilXMLResultSetWriter.php.

References ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

Referenced by __buildRows().

{
$this->xmlStartTag('row',null);
foreach ($xmlResultSetRow->getColumns() as $value)
{
$this->xmlElement('column',null,$value);
}
$this->xmlEndTag('row');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilXMLResultSetWriter::__buildColSpecs ( )

Definition at line 99 of file class.ilXMLResultSetWriter.php.

References ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

Referenced by start().

{
$this->xmlStartTag("colspecs");
foreach ($this->xmlResultSet->getColSpecs() as $colSpec) {
$attr = array ("idx" => $colSpec->getIndex(), "name" => $colSpec->getName());
$this->xmlElement("colspec", $attr, null);
}
$this->xmlEndTag("colspecs");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilXMLResultSetWriter::__buildFooter ( )

Definition at line 122 of file class.ilXMLResultSetWriter.php.

References ilXmlWriter\xmlEndTag().

Referenced by start().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilXMLResultSetWriter::__buildHeader ( )

Definition at line 89 of file class.ilXMLResultSetWriter.php.

References ilXmlWriter\xmlHeader(), ilXmlWriter\xmlSetDtdDef(), and ilXmlWriter\xmlStartTag().

Referenced by start().

{
$this->xmlSetDtdDef("<!DOCTYPE result PUBLIC \"-//ILIAS//DTD XMLResultSet//EN\" \"".ILIAS_HTTP_PATH."/xml/ilias_xml_resultset_3_7.dtd\">");
$this->xmlHeader();
$this->xmlStartTag("result");
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilXMLResultSetWriter::__buildRows ( )

Definition at line 111 of file class.ilXMLResultSetWriter.php.

References $row, __appendRow(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

Referenced by start().

{
$this->xmlStartTag("rows");
foreach($this->xmlResultSet->getRows() as $row)
{
$this->__appendRow($row);
}
$this->xmlEndTag("rows");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilXMLResultSetWriter::getXML ( )

Definition at line 67 of file class.ilXMLResultSetWriter.php.

References ilXmlWriter\xmlDumpMem().

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

+ Here is the call graph for this function:

ilXMLResultSetWriter::ilXMLResultSetWriter ( $xmlResultSet)

Definition at line 42 of file class.ilXMLResultSetWriter.php.

References $xmlResultSet, and ilXmlWriter\ilXmlWriter().

{
$this->xmlResultSet = $xmlResultSet;
}

+ Here is the call graph for this function:

ilXMLResultSetWriter::start ( )

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

References __buildColSpecs(), __buildFooter(), __buildHeader(), and __buildRows().

{
if(!is_object($this->xmlResultSet))
{
return false;
}
$this->__buildHeader();
$this->__buildColSpecs();
$this->__buildRows();
$this->__buildFooter();
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilXMLResultSetWriter::$xmlResultSet

Definition at line 40 of file class.ilXMLResultSetWriter.php.

Referenced by ilXMLResultSetWriter().


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