![]() |
![]() |

Public Member Functions | |
| XMLOutputStrategy ($file, $docType, $dtd, $encoding='UTF-8', $indent=2, $linebreak="\n") | |
| writeHeader () | |
| writeFooter () | |
| writeObject (&$obj) | |
| writeToFile ($text) | |
| writeObjectContent (&$obj, $curIndent) | |
| isWritingOIDs () | |
| writeElement (&$obj, $name) | |
| getElementName (&$obj) | |
| getElementValue (&$obj, $name, $value) | |
| writeAttribute (&$obj, $name) | |
| getAttributeName (&$obj, $name) | |
| getAttributeValue (&$obj, $name, $value) | |
Data Fields | |
| $_id = 0 | |
| $_file = '' | |
| $_docType = '' | |
| $_dtd = '' | |
| $_encoding = '' | |
| $_fp = 0 | |
| $_indent = '' | |
| $_linebreak = "\n" | |
| $_tagsToClose = null | |
| $_lastIndent = -1 | |
| $_fileOk = false | |
wCMF - wemove Content Management Framework Copyright (C) 2005-2009 wemove digital solutions GmbH
Licensed under the terms of any of the following licenses at your choice:
See the license.txt file distributed with this work for additional information.
Definition at line 32 of file class.XMLOutputStrategy.php.
| XMLOutputStrategy | ( | $ | file, | |
| $ | docType, | |||
| $ | dtd, | |||
| $ | encoding = 'UTF-8', |
|||
| $ | indent = 2, |
|||
| $ | linebreak = "\n" | |||
| ) |
Constructor.
| file | The output file name. | |
| docType | The document type. | |
| dtd | The document type definition name. | |
| encoding | The used encoding (default: UTF-8). | |
| indent | The number of spaces to indent (default: 2). | |
| linebreak | The linebreak char to use (default: ). |
Definition at line 54 of file class.XMLOutputStrategy.php.
| writeHeader | ( | ) |
Write the xml header.
Implements OutputStrategy.
Definition at line 68 of file class.XMLOutputStrategy.php.
References Log::warn(), and writeToFile().

| writeFooter | ( | ) |
Write the xml footer.
Implements OutputStrategy.
Definition at line 97 of file class.XMLOutputStrategy.php.
References writeToFile().

| writeObject | ( | &$ | obj | ) |
Write the object.
| obj | The object to write. |
Implements OutputStrategy.
Definition at line 115 of file class.XMLOutputStrategy.php.
References writeObjectContent(), and writeToFile().

| writeToFile | ( | $ | text | ) |
Actually write text to the file.
| text | The text to write |
Definition at line 153 of file class.XMLOutputStrategy.php.
Referenced by writeAttribute(), writeElement(), writeFooter(), writeHeader(), writeObject(), and writeObjectContent().
| writeObjectContent | ( | &$ | obj, | |
| $ | curIndent | |||
| ) |
Write the object's content including opening tag, excluding closing tag.
| obj | The object to write. | |
| curIndent | The current indent. |
Definition at line 163 of file class.XMLOutputStrategy.php.
References getElementName(), isWritingOIDs(), writeAttribute(), writeElement(), and writeToFile().
Referenced by writeObject().

| isWritingOIDs | ( | ) |
Determine wether the oid should be written to the file. The default implementation returns true.
Definition at line 197 of file class.XMLOutputStrategy.php.
Referenced by writeObjectContent().
| writeElement | ( | &$ | obj, | |
| $ | name | |||
| ) |
Write an object value of type DATATYPE_ELEMENT.
| obj | The object to write | |
| name | The name of the value |
Definition at line 207 of file class.XMLOutputStrategy.php.
References getElementValue(), and writeToFile().
Referenced by writeObjectContent().

| getElementName | ( | &$ | obj | ) |
Get the xml element name for an object. The default implementation returns the result of the getType() method.
| obj | The object to write |
Definition at line 222 of file class.XMLOutputStrategy.php.
Referenced by writeObjectContent().
| getElementValue | ( | &$ | obj, | |
| $ | name, | |||
| $ | value | |||
| ) |
Get the xml element value for an object. The default implementation replaces newlines by
and applies htmlspecialchars to the result.
| obj | The object to write | |
| name | The name of the element | |
| value | The value to write |
Definition at line 235 of file class.XMLOutputStrategy.php.
Referenced by writeElement().
| writeAttribute | ( | &$ | obj, | |
| $ | name | |||
| ) |
Write an object value of type DATATYPE_ATTRIBUTE.
| obj | The object to write | |
| name | The name of the value |
Definition at line 245 of file class.XMLOutputStrategy.php.
References getAttributeName(), getAttributeValue(), and writeToFile().
Referenced by writeObjectContent().

| getAttributeName | ( | &$ | obj, | |
| $ | name | |||
| ) |
Get the xml attribute name for an object value. The default implementation returns the name of the attribute.
| obj | The object to write | |
| name | The name of the attribute |
Definition at line 261 of file class.XMLOutputStrategy.php.
Referenced by writeAttribute().
| getAttributeValue | ( | &$ | obj, | |
| $ | name, | |||
| $ | value | |||
| ) |
Get the xml attribute value for an object value. The default implementation replaces newlines by
and applies htmlspecialchars to the result.
| obj | The object to write | |
| name | The name of the attribute | |
| value | The value to write |
Definition at line 274 of file class.XMLOutputStrategy.php.
Referenced by writeAttribute().
| $_id = 0 |
Definition at line 34 of file class.XMLOutputStrategy.php.
| $_file = '' |
Definition at line 35 of file class.XMLOutputStrategy.php.
| $_docType = '' |
Definition at line 36 of file class.XMLOutputStrategy.php.
| $_dtd = '' |
Definition at line 37 of file class.XMLOutputStrategy.php.
| $_encoding = '' |
Definition at line 38 of file class.XMLOutputStrategy.php.
| $_fp = 0 |
Definition at line 39 of file class.XMLOutputStrategy.php.
| $_indent = '' |
Definition at line 40 of file class.XMLOutputStrategy.php.
| $_linebreak = "\n" |
Definition at line 41 of file class.XMLOutputStrategy.php.
| $_tagsToClose = null |
Definition at line 42 of file class.XMLOutputStrategy.php.
| $_lastIndent = -1 |
Definition at line 43 of file class.XMLOutputStrategy.php.
| $_fileOk = false |
Definition at line 44 of file class.XMLOutputStrategy.php.
|
This page generated via doxygen 1.5.8 Mon Mar 30 01:58:47 2009. Copyright © 2009 wemove digital solutions GmbH. |
|