Documentation TYPO3 par Ameos

t3lib_xml Class Reference

List of all members.

Public Member Functions

 t3lib_xml ($topLevelName)
 setRecFields ($table, $list)
 getResult ()
 WAPHeader ()
 renderHeader ()
 renderFooter ()
 newLevel ($name, $beginEndFlag=0, $params=array())
 output ($content)
 indent ($b)
 renderRecords ($table, $res)
 addRecord ($table, $row)
 getRowInXML ($table, $row)
 utf8 ($content)
 substNewline ($string)
 fieldWrap ($field, $value)
 WAPback ()
 addLine ($str)
 t3lib_xml ($topLevelName)
 setRecFields ($table, $list)
 getResult ()
 WAPHeader ()
 renderHeader ()
 renderFooter ()
 newLevel ($name, $beginEndFlag=0, $params=array())
 output ($content)
 indent ($b)
 renderRecords ($table, $res)
 addRecord ($table, $row)
 getRowInXML ($table, $row)
 utf8 ($content)
 substNewline ($string)
 fieldWrap ($field, $value)
 WAPback ()
 addLine ($str)

Public Attributes

 $topLevelName = 'typo3_test'
 $XML_recFields = array()
 $XMLIndent = 0
 $Icode = ''
 $XMLdebug = 0
 $includeNonEmptyValues = 0
 $lines = array()

Detailed Description

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


Constructor & Destructor Documentation

t3lib_xml::t3lib_xml topLevelName  ) 
 

Constructor, setting topLevelName to the input var

Parameters:
string Top Level Name
Returns:
void

Definition at line 102 of file class.t3lib_xml.php.

References $topLevelName.

t3lib_xml::t3lib_xml topLevelName  ) 
 

Constructor, setting topLevelName to the input var

Parameters:
string Top Level Name
Returns:
void

Definition at line 102 of file class.t3lib_xml.php.

References $topLevelName.


Member Function Documentation

t3lib_xml::addLine str  ) 
 

Add a line to the internal XML structure (automatically prefixed with ->Icode.

Parameters:
string Line to add to the $this->lines array
Returns:
void

Definition at line 315 of file class.t3lib_xml.php.

t3lib_xml::addLine str  ) 
 

Add a line to the internal XML structure (automatically prefixed with ->Icode.

Parameters:
string Line to add to the $this->lines array
Returns:
void

Definition at line 315 of file class.t3lib_xml.php.

t3lib_xml::addRecord table,
row
 

Adds record, $row, from table, $table, to the internal array of XML-lines

Parameters:
string Table name
array The row to add to XML structure from the table name
Returns:
void

Definition at line 237 of file class.t3lib_xml.php.

t3lib_xml::addRecord table,
row
 

Adds record, $row, from table, $table, to the internal array of XML-lines

Parameters:
string Table name
array The row to add to XML structure from the table name
Returns:
void

Definition at line 237 of file class.t3lib_xml.php.

t3lib_xml::fieldWrap field,
value
 

Wraps the value in tags with element name, $field.

Parameters:
string Fieldname from a record - will be the element name
string Value from the field - will be wrapped in the elements.
Returns:
string The wrapped string.

Definition at line 292 of file class.t3lib_xml.php.

t3lib_xml::fieldWrap field,
value
 

Wraps the value in tags with element name, $field.

Parameters:
string Fieldname from a record - will be the element name
string Value from the field - will be wrapped in the elements.
Returns:
string The wrapped string.

Definition at line 292 of file class.t3lib_xml.php.

t3lib_xml::getResult  ) 
 

Returns the result of the XML rendering, basically this is imploding the internal ->lines array with linebreaks.

Returns:
string

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

References output().

t3lib_xml::getResult  ) 
 

Returns the result of the XML rendering, basically this is imploding the internal ->lines array with linebreaks.

Returns:
string

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

References output().

t3lib_xml::getRowInXML table,
row
 

Internal function for adding the actual content of the $row from $table to the internal structure. Notice that only fields from $table that are listed in $this->XML_recFields[$table] (set by setRecFields()) will be rendered (and in the order found in that array!) Content from the row will be htmlspecialchar()'ed, UTF-8 encoded and have chr(10) (newlines) exchanged for '<newline>' tags. The element name for a value equals the fieldname from the record.

Parameters:
string Table name
array Row from table to add.
Returns:
void private

Definition at line 255 of file class.t3lib_xml.php.

References t3lib_div::trimExplode().

t3lib_xml::getRowInXML table,
row
 

Internal function for adding the actual content of the $row from $table to the internal structure. Notice that only fields from $table that are listed in $this->XML_recFields[$table] (set by setRecFields()) will be rendered (and in the order found in that array!) Content from the row will be htmlspecialchar()'ed, UTF-8 encoded and have chr(10) (newlines) exchanged for '<newline>' tags. The element name for a value equals the fieldname from the record.

Parameters:
string Table name
array Row from table to add.
Returns:
void private

Definition at line 255 of file class.t3lib_xml.php.

References t3lib_div::trimExplode().

t3lib_xml::indent b  ) 
 

Increments/Decrements Indentation counter, ->XMLIndent Sets and returns ->Icode variable which is a line prefix consisting of a number of tab-chars corresponding to the indent-levels of the current posision (->XMLindent)

Parameters:
boolean If true the XMLIndent var is increased, otherwise decreased
Returns:
string ->Icode - the prefix string with TAB-chars.

Definition at line 208 of file class.t3lib_xml.php.

t3lib_xml::indent b  ) 
 

Increments/Decrements Indentation counter, ->XMLIndent Sets and returns ->Icode variable which is a line prefix consisting of a number of tab-chars corresponding to the indent-levels of the current posision (->XMLindent)

Parameters:
boolean If true the XMLIndent var is increased, otherwise decreased
Returns:
string ->Icode - the prefix string with TAB-chars.

Definition at line 208 of file class.t3lib_xml.php.

Referenced by newLevel().

t3lib_xml::newLevel name,
beginEndFlag = 0,
params = array()
 

Indents/Outdents a new level named, $name

Parameters:
string The name of the new element for this level
boolean If false, then this function call will *end* the level, otherwise create it.
array Array of attributes in key/value pairs which will be added to the element (tag), $name
Returns:
void

Definition at line 167 of file class.t3lib_xml.php.

References indent().

t3lib_xml::newLevel name,
beginEndFlag = 0,
params = array()
 

Indents/Outdents a new level named, $name

Parameters:
string The name of the new element for this level
boolean If false, then this function call will *end* the level, otherwise create it.
array Array of attributes in key/value pairs which will be added to the element (tag), $name
Returns:
void

Definition at line 167 of file class.t3lib_xml.php.

References indent().

Referenced by renderFooter(), renderHeader(), and WAPHeader().

t3lib_xml::output content  ) 
 

Function that will return the content from string $content. If the internal ->XMLdebug flag is set the content returned will be formatted in

-tags

Parameters:
string The XML content to output
Returns:
string Output

Definition at line 192 of file class.t3lib_xml.php.

t3lib_xml::output content  ) 
 

Function that will return the content from string $content. If the internal ->XMLdebug flag is set the content returned will be formatted in

-tags

Parameters:
string The XML content to output
Returns:
string Output

Definition at line 192 of file class.t3lib_xml.php.

Referenced by getResult().

t3lib_xml::renderFooter  ) 
 

Sets the footer (of ->topLevelName)

Returns:
void

Definition at line 155 of file class.t3lib_xml.php.

References newLevel().

t3lib_xml::renderFooter  ) 
 

Sets the footer (of ->topLevelName)

Returns:
void

Definition at line 155 of file class.t3lib_xml.php.

References newLevel().

t3lib_xml::renderHeader  ) 
 

Initialize "anonymous" XML document with <?xml + <!DOCTYPE header tags and setting ->topLevelName as the first level. Encoding is set to UTF-8!

Returns:
void

Definition at line 144 of file class.t3lib_xml.php.

References newLevel().

t3lib_xml::renderHeader  ) 
 

Initialize "anonymous" XML document with <?xml + <!DOCTYPE header tags and setting ->topLevelName as the first level. Encoding is set to UTF-8!

Returns:
void

Definition at line 144 of file class.t3lib_xml.php.

References newLevel().

t3lib_xml::renderRecords table,
res
 

Takes a SQL result for $table and traverses it, adding rows

Parameters:
string Tablename
pointer SQL resource pointer, should be reset
Returns:
void

Definition at line 224 of file class.t3lib_xml.php.

t3lib_xml::renderRecords table,
res
 

Takes a SQL result for $table and traverses it, adding rows

Parameters:
string Tablename
pointer SQL resource pointer, should be reset
Returns:
void

Definition at line 224 of file class.t3lib_xml.php.

t3lib_xml::setRecFields table,
list
 

When outputting a input record in XML only fields listed in $this->XML_recFields for the current table will be rendered.

Parameters:
string Table name
string Commalist of fields names from the table, $table, which is supposed to be rendered in the XML output. If a field is not in this list, it is not rendered.
Returns:
void

Definition at line 113 of file class.t3lib_xml.php.

t3lib_xml::setRecFields table,
list
 

When outputting a input record in XML only fields listed in $this->XML_recFields for the current table will be rendered.

Parameters:
string Table name
string Commalist of fields names from the table, $table, which is supposed to be rendered in the XML output. If a field is not in this list, it is not rendered.
Returns:
void

Definition at line 113 of file class.t3lib_xml.php.

t3lib_xml::substNewline string  ) 
 

Substitutes chr(10) characters with a '<newline>' tag.

Parameters:
string Input value
Returns:
string Processed input value

Definition at line 281 of file class.t3lib_xml.php.

t3lib_xml::substNewline string  ) 
 

Substitutes chr(10) characters with a '<newline>' tag.

Parameters:
string Input value
Returns:
string Processed input value

Definition at line 281 of file class.t3lib_xml.php.

t3lib_xml::utf8 content  ) 
 

UTF-8 encodes the input content (from ISO-8859-1!)

Parameters:
string String content to UTF-8 encode
Returns:
string Encoded content.

Definition at line 271 of file class.t3lib_xml.php.

t3lib_xml::utf8 content  ) 
 

UTF-8 encodes the input content (from ISO-8859-1!)

Parameters:
string String content to UTF-8 encode
Returns:
string Encoded content.

Definition at line 271 of file class.t3lib_xml.php.

t3lib_xml::WAPback  ) 
 

Creates the BACK button for WAP documents

Returns:
void

Definition at line 301 of file class.t3lib_xml.php.

t3lib_xml::WAPback  ) 
 

Creates the BACK button for WAP documents

Returns:
void

Definition at line 301 of file class.t3lib_xml.php.

t3lib_xml::WAPHeader  ) 
 

Initialize WML (WAP) document with <?xml + <!DOCTYPE header tags and setting ->topLevelName as the first level.

Returns:
void

Definition at line 132 of file class.t3lib_xml.php.

References newLevel().

t3lib_xml::WAPHeader  ) 
 

Initialize WML (WAP) document with <?xml + <!DOCTYPE header tags and setting ->topLevelName as the first level.

Returns:
void

Definition at line 132 of file class.t3lib_xml.php.

References newLevel().


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


Généré par TYPO3 Ameos avec  doxygen 1.4.6