+++ /dev/null
-<?php\r
-/**\r
-* Extracts use statements (include and friends) an thheir documentation from php code.\r
-* @author Ulf Wendel <ulf.wendel@redsys.de>\r
-* @version 0.1alpha\r
-*/\r
-class PhpdocUseParser extends PhpdocParserCore {\r
-\r
- /**\r
- * Structure of an empty use entry.\r
- * @var array\r
- */\r
- var $emptyUse = array(\r
- "type" => "",\r
- "file" => "",\r
- "undoc" => true\r
- );\r
- \r
-\r
- /**\r
- * List of allowed tags in use doc comments.\r
- * @var array\r
- */ \r
- var $useTags = array(\r
- "return" => true,\r
- \r
- "see" => true,\r
- "link" => true,\r
- \r
- "authhor" => true,\r
- "copyright" => true,\r
- \r
- "version" => true,\r
- "since" => true,\r
- \r
- "deprecated" => true,\r
- "deprec" => true,\r
- \r
- "include" => true,\r
-\r
- "exclude" => true, \r
- "magic" => true,\r
- "todo" => true\r
- );\r
-\r
- /**\r
- * Takes the result from getPhpdocParagraphs() and interprets it.\r
- * @param array\r
- */ \r
- function analyseUse($para) {\r
- \r
- $use = $this->emptyUse;\r
- $use["file"] = $para["file"];\r
- \r
- if (""!=$para["doc"]) {\r
- \r
- $use = $this->analyseTags($this->getTags($para["doc"]), $use, $this->useTags);\r
- \r
- list($msg, $use) = $this->checkParserErrors($use, "use (include and friends)");\r
- if (""!=$msg)\r
- $this->warn->addDocWarning($this->currentFile, "use", $use["file"], $msg, "mismatch");\r
- \r
- list($use["sdesc"], $use["desc"]) = $this->getDescription($para["doc"]);\r
- \r
- $use["undoc"] = false;\r
- }\r
- \r
- $use["type"] = $para["type"];\r
-\r
- return $use;\r
- } // end func analyseUse\r
- \r
-} // end class PhpdocUseParser\r
-?>
\ No newline at end of file