3 * Provides an API to access PHPDoc XML files.
\r
5 * It's up to you eigther to use this class to access
\r
6 * the phpdoc xml files or to write your own parser.
\r
8 class PhpdocAccessor extends PhpdocObject {
\r
11 * Instance of PhpdocXMLReader
\r
12 * @var object PhpdocXMLReader $xmlreader
\r
17 * Result of the PhpdocXMLReader
\r
23 * Free xml resources on calling a getXY() function?
\r
25 * One of the design goals was to minimize the memory consumption of PHPdoc.
\r
26 * So PHPdoc tries to save data as soon as possible to the disk, reuse objects
\r
27 * and free resources of an object when they are no longer needed. The default
\r
28 * value of true will cause the object to free the memory used by the
\r
29 * xml data as soon as possible.
\r
33 var $freeOnGet = true;
\r
36 * Reformatted PhpdocXMLReader result array
\r
39 var $data = array();
\r
42 * Loads the specified xml file.
\r
44 * @param string Name of the xml file
\r
45 * @return boolean False if the given xml file was not
\r
46 * found or is empty otherwise true.
\r
50 function loadXMLFile($filename) {
\r
52 $this->xmlreader = new PhpdocXMLReader;
\r
54 $this->xml = $this->xmlreader->parse($filename);
\r
55 $this->xml = $this->xml["phpdoc"];
\r
56 $ok = (!is_array($this->xml) || 0==count($this->xml)) ? false : true;
\r
61 } // end func loadXMLFile
\r
64 * Reformats the xml result array from the PhpdocXMLReader.
\r
66 * Every derived class must override this function to call the functions
\r
67 * it needs to reorganize the data from the PhpdocXMLReader in a
\r
68 * way that it needs.
\r
76 } // end class PhpdocAccessor
\r