+++ /dev/null
-<?php\r
-/**\r
-* Exports a list of documentation warnings found by phpdoc\r
-* \r
-*/ \r
-class PhpdocXMLWarningExporter extends PhpdocXMLExporter {\r
- \r
- /**\r
- * Attributes of a warning container.\r
- * @var array\r
- */\r
- var $warningAttributes = array(\r
- "name" => "CDATA",\r
- "type" => "CDATA",\r
- "elementtype" => "CDATA"\r
- );\r
- \r
- var $fileprefix = "warnings_";\r
- \r
- function PhpdocXMLWarningExporter() {\r
- $this->PhpdocXMLExporter();\r
- } // end constructor\r
- \r
- function create() {\r
-\r
- reset($this->result);\r
- while (list($file, $warnings)=each($this->result)) {\r
- \r
- $this->xmlwriter->startElement("warnings", "", array("file" => array( "type" => "CDATA", "value" => $file)));\r
- \r
- reset($warnings);\r
- while (list($type, $warning)=each($warnings)) {\r
- \r
- reset($warning);\r
- while (list($k, $data)=each($warning)) {\r
- $data["elementtype"] = $type;\r
- $this->xmlwriter->addElement("warning", $data["msg"], $this->getAttributes($data, $this->warningAttributes));\r
- }\r
- \r
- }\r
- \r
- $this->xmlwriter->endElement("warnings");\r
- \r
- }\r
- \r
- } // end function create\r
- \r
-} // end class PhpdocXMLWarningExporter\r
-?>
\ No newline at end of file