+++ /dev/null
-<?php\r
-/**\r
-* Provides an API to access PHPDoc XML files.\r
-* \r
-* It's up to you eigther to use this class to access \r
-* the phpdoc xml files or to write your own parser.\r
-*/\r
-class PhpdocAccessor extends PhpdocObject {\r
-\r
- /**\r
- * Instance of PhpdocXMLReader\r
- * @var object PhpdocXMLReader $xmlreader\r
- */ \r
- var $xmlreader;\r
- \r
- /**\r
- * Result of the PhpdocXMLReader\r
- * @var array $xml\r
- */\r
- var $xml = array();\r
- \r
- /**\r
- * Free xml resources on calling a getXY() function?\r
- * \r
- * One of the design goals was to minimize the memory consumption of PHPdoc.\r
- * So PHPdoc tries to save data as soon as possible to the disk, reuse objects\r
- * and free resources of an object when they are no longer needed. The default \r
- * value of true will cause the object to free the memory used by the \r
- * xml data as soon as possible.\r
- * \r
- * @var boolean\r
- */ \r
- var $freeOnGet = true;\r
-\r
- /**\r
- * Reformatted PhpdocXMLReader result array\r
- * @var array\r
- */\r
- var $data = array();\r
- \r
- /**\r
- * Loads the specified xml file. \r
- *\r
- * @param string Name of the xml file\r
- * @return boolean False if the given xml file was not \r
- * found or is empty otherwise true.\r
- * @access public\r
- * @see init()\r
- */\r
- function loadXMLFile($filename) {\r
- \r
- $this->xmlreader = new PhpdocXMLReader;\r
- \r
- $this->xml = $this->xmlreader->parse($filename);\r
- $this->xml = $this->xml["phpdoc"];\r
- $ok = (!is_array($this->xml) || 0==count($this->xml)) ? false : true;\r
- \r
- $this->init();\r
- \r
- return $ok; \r
- } // end func loadXMLFile\r
- \r
- /**\r
- * Reformats the xml result array from the PhpdocXMLReader.\r
- * \r
- * Every derived class must override this function to call the functions\r
- * it needs to reorganize the data from the PhpdocXMLReader in a \r
- * way that it needs. \r
- *\r
- * @abstract\r
- * @see $xml, $data\r
- */\r
- function init() {\r
- } // end func init\r
-\r
-} // end class PhpdocAccessor\r
-?>
\ No newline at end of file