removed mods directory from the ATutor codebase
[atutor.git] / mods / phpdoc / PHPDoc / parser / PhpdocModuleParser.php
diff --git a/mods/phpdoc/PHPDoc/parser/PhpdocModuleParser.php b/mods/phpdoc/PHPDoc/parser/PhpdocModuleParser.php
deleted file mode 100644 (file)
index 1888d97..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-<?php\r
-/**\r
-* Extracts modules and their documentation from php code.\r
-* @author      Ulf Wendel <ulf.wendel@redsys.de>\r
-* @version 0.1alpha\r
-*/\r
-class PhpdocModuleParser extends PhpdocConstantParser {\r
-\r
-       /**\r
-       * Empty hash that shows the structure of a module.\r
-       * @var  array\r
-       */\r
-       var $emptyModule = array(\r
-       \r
-                                                                                                               "name"                          => "",\r
-                                                                                                               "group"                         => "",\r
-                                                                                                               "undoc"                         => true,\r
-                                                                                                               \r
-                                                                                                               "functions"             => array(),\r
-                                                                                                               "consts"                        => array(),\r
-                                                                                                               "uses"                          => array()\r
-                                                                                               );\r
-\r
-       /**\r
-       * List of tags allowed within a module doc comment.\r
-       * @var  array   tagname => true\r
-       */                                                                                                      \r
-       var $moduleTags = array(\r
-                                                                                                               "module"                        => true,\r
-                                                                                                               "modulegroup"   => true,\r
-                                                                                                               \r
-                                                                                                               "access"                        => true,\r
-                                                                                                               \r
-                                                                                                               "see"                                   => true,\r
-                                                                                                               "link"                          => true,\r
-                                                                                                               \r
-                                                                                                               "author"                        => true,\r
-                                                                                                               "copyright"             => true,\r
-                                                                                                               \r
-                                                                                                               "version"                       => true,\r
-                                                                                                               "since"                         => true,\r
-                                                                                                               \r
-                                                                                                               "deprecated"    => true,\r
-                                                                                                               "deprec"                        => true,\r
-                                                                                                               \r
-                                                                                                               "brother"                       => true,\r
-                                                                                                               "sister"                        => true,\r
-                                                                                                               \r
-                                                                                                               "exclude"               => true,\r
-                                                                                                               \r
-                                                                                                               "package"                       => true,\r
-                                                                                                               \r
-                                                                                                               "magic"                         => true,\r
-                                                                                                               "todo"                          => true\r
-                                                                                               );\r
-\r
-       /**\r
-       * Hash of all module groups\r
-       * @var  array\r
-       */\r
-       var $moduleGroups = array();\r
-       \r
-       /**\r
-       * Central module parsing function.\r
-       *\r
-       * @param        array           Array of parsing data\r
-       * @return       array           \r
-       * @see  analyseModuleDoc()\r
-       */\r
-       function analyseModule($para) {\r
-               \r
-               $module = $this->analyseModuleDoc($para["modules"]);                    \r
-               unset($para["modules"]);\r
-\r
-               $this->moduleGroups[$module["group"]][] = $module["name"];\r
-\r
-               reset($para["functions"]);\r
-               while (list($k, $data)=each($para["functions"]))\r
-                       $module["functions"][strtolower($data["name"])] = $this->analyseFunction($data);\r
-               unset($para["functions"]);\r
-                       \r
-               reset($para["consts"]);\r
-               while (list($k, $data)=each($para["consts"]))\r
-                       $module["consts"][strtolower($data["name"])] = $this->analyseConstant($data);\r
-               unset($para["const"]);\r
-               \r
-               reset($para["uses"]);\r
-               while (list($k, $data)=each($para["uses"]))\r
-                       $module["uses"][strtolower($data["file"])] = $this->analyseUse($data);\r
-               \r
-               return $module;\r
-       } // end func analyseModule\r
-       \r
-       /**\r
-       * Extracts the allowed documentation tags out of a module doc comment.\r
-       * \r
-       * @param        array   Module paragraph\r
-       * @return       array           \r
-       */\r
-       function analyseModuleDoc($para) {\r
-       \r
-               $module = $this->emptyModule;\r
-               $module["name"] = (""!=$para["name"]) ? $para["name"] : $this->currentFile;\r
-               $module["group"] = (""!=$para["group"]) ? $para["group"] : $this->currentFile;\r
-               \r
-               if ("missing" == $para["status"]) {\r
-                       \r
-                       $msg = "The file '$this->currentFile' does not contain any classes and seems to lack a module doc comment.";\r
-                       $this->warn->addDocWarning($this->currentFile, "module", $module["name"], $msg, "missing");\r
-                       \r
-               } else if ("tags missing" == $para["status"]) {\r
-               \r
-                       $msg = "The module doc comment does not contain a @module or @modulegroup tag, the module gets names: '$this->currentFile'";\r
-                       $this->warn->addDocWarning($this->currentFile, "module", $module["name"], $msg, "missing");\r
-               \r
-               }\r
-               \r
-               if (""!=$para["doc"]) {         \r
-                       \r
-                       $tags   = $this->getTags($para["doc"]);\r
-                       $module = $this->analyseTags($tags, $module, $this->moduleTags);\r
-                       \r
-                       list($msg, $module) = $this->checkParserErrors($module, "module");\r
-                       if (""!=$msg) \r
-                               $this->warn->addDocWarning($this->currentFile, "module", $module["name"], $msg, "mismatch");\r
-                       \r
-                       list($shortdesc, $fulldesc) = $this->getDescription($para["doc"]);                      \r
-                       $module["sdesc"] = $shortdesc;\r
-                       $module["desc"]  = $fulldesc;\r
-               \r
-                       $module["undoc"] = false;\r
-               }\r
-\r
-               unset($module["module"]);\r
-               unset($module["modulegroup"]);\r
-               \r
-               return $module;         \r
-       } // end analyseModuleDoc\r
-       \r
-} // end class PhpdocModuleParser\r
-?>
\ No newline at end of file