cvs: pear /XML_Transformer Transformer.php

From: Date: Sun, 12 May 2002 09:57:22 +0000
Subject: cvs: pear /XML_Transformer Transformer.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3771@lists.php.net to get a copy of this message
sebastian Sun May 12 05:57:22 2002 EDT Modified files: /pear/XML_Transformer Transformer.php Log: Add vim markers. Index: pear/XML_Transformer/Transformer.php diff -u pear/XML_Transformer/Transformer.php:1.11 pear/XML_Transformer/Transformer.php:1.12 --- pear/XML_Transformer/Transformer.php:1.11 Sun May 12 03:04:23 2002 +++ pear/XML_Transformer/Transformer.php Sun May 12 05:57:21 2002 @@ -17,7 +17,7 @@ // | Kristian Köhntopp <kris@koehntopp.de> | // +----------------------------------------------------------------------+ // -// $Id: Transformer.php,v 1.11 2002/05/12 07:04:23 sebastian Exp $ +// $Id: Transformer.php,v 1.12 2002/05/12 09:57:21 sebastian Exp $ // /** @@ -62,10 +62,12 @@ * * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Kristian Köhntopp <kris@koehntopp.de> -* @version $Revision: 1.11 $ +* @version $Revision: 1.12 $ * @access public */ class XML_Transformer { + // {{{ Members + /** * @var boolean * @access private @@ -120,6 +122,9 @@ */ var $_started = false; + // }}} + // {{{ function XML_Transformer($parameters = array()) + /** * Constructor. * @@ -161,6 +166,9 @@ } } + // }}} + // {{{ function attributesToString($attributes) + /** * Returns string representation of attributes array. * @@ -185,6 +193,9 @@ return $string; } + // }}} + // {{{ function canonicalName($name) + /** * Returns the canonical name of a given element. * @@ -196,6 +207,9 @@ return $this->_caseFolding ? strtoupper($name) : $name; } + // }}} + // {{{ function overloadElement($element, $startHandler, $endHandler, $recursiveOperation = '') + /** * Overloads an XML element and binds its * opening and closing tags to a PHP callback. @@ -215,6 +229,9 @@ $this->_overloadedElements[$element]['recursiveOperation'] = !empty($recursiveOperation) ? $recursiveOperation : $this->_recursiveOperation; } + // }}} + // {{{ function unOverloadElement($element) + /** * Reverts overloading of a given element. * @@ -234,6 +251,9 @@ } } + // }}} + // {{{ function isOverloadedElement($element) + /** * Returns true if a given element is overloaded, * false otherwise. @@ -246,6 +266,9 @@ return isset($this->_overloadedElements[$this->canonicalName($element)]); } + // }}} + // {{{ function overloadNamespace($namespacePrefix, &$object) + /** * Overloads an XML Namespace. * @@ -272,6 +295,9 @@ } } + // }}} + // {{{ function unOverloadNamespace($namespacePrefix) + /** * Reverts overloading of a given XML Namespace. * @@ -291,6 +317,9 @@ } } + // }}} + // {{{ function isOverloadedNamespace($namespacePrefix) + /** * Returns true if a given namespace is overloaded, * false otherwise. @@ -303,6 +332,9 @@ return isset($this->_overloadedNamespaces[$this->canonicalName($namespacePrefix)]); } + // }}} + // {{{ function setCaseFolding($caseFolding) + /** * Sets the XML parser's case-folding option. * @@ -315,6 +347,9 @@ } } + // }}} + // {{{ function setRecursiveOperation($recursiveOperation) + /** * Enables or disables the recursive operation. * @@ -327,6 +362,9 @@ } } + // }}} + // {{{ function start() + /** * Starts the output-buffering, * and thus the transformation. @@ -340,6 +378,9 @@ } } + // }}} + // {{{ function transform($xml) + /** * Transforms a given XML string using the registered * PHP callbacks for overloaded tags. @@ -384,6 +425,9 @@ return $this->_cdataStack[0]; } + // }}} + // {{{ function _startElement($parser, $element, $attributes) + /** * SAX callback for 'startElement' event. * @@ -438,6 +482,9 @@ $this->_cdataStack[$this->_level] = $cdata; } + // }}} + // {{{ function _endElement($parser, $element) + /** * SAX callback for 'endElement' event. * @@ -508,6 +555,9 @@ $this->_cdataStack[--$this->_level] .= $cdata; } + // }}} + // {{{ function _characterData($parser, $cdata) + /** * SAX callback for 'characterData' event. * @@ -519,6 +569,9 @@ $this->_cdataStack[$this->_level] .= $cdata; } + // }}} + // {{{ function _parseCallback($element, $event, $callback) + /** * Parses a PHP callback. * @@ -579,6 +632,9 @@ } } + // }}} + // {{{ function _registerElementCallback($element, $event, $callback) + /** * Registers a PHP callback for a given event of a XML element. * @@ -593,6 +649,9 @@ } } + // }}} + // {{{ function _handleError($errorMessage) + /** * Inserts an error message into the output. * @@ -604,5 +663,12 @@ $errorMessage . " -->\n"; } + + // }}} } + +/* + * vim600: et sw=2 ts=2 fdm=marker + * vim<600: et sw=2 ts=2 + */ ?>

« previous php.pear.cvs (#3771) next »