removed mods directory from the ATutor codebase
[atutor.git] / mods / phpdoc / PHPDoc / renderer / html / PhpdocHTMLDocumentRenderer.php
diff --git a/mods/phpdoc/PHPDoc/renderer/html/PhpdocHTMLDocumentRenderer.php b/mods/phpdoc/PHPDoc/renderer/html/PhpdocHTMLDocumentRenderer.php
deleted file mode 100644 (file)
index c3a9fa1..0000000
+++ /dev/null
@@ -1,743 +0,0 @@
-<?php\r
-/**\r
-* Provides functioninality to render modules and classes.\r
-*\r
-* @version $Id: PhpdocHTMLDocumentRenderer.php,v 1.4 2000/12/03 22:37:37 uw Exp $\r
-*/\r
-class PhpdocHTMLDocumentRenderer extends PhpdocHTMLRenderer {\r
-\r
-       /**\r
-       * Message displayed if an object lacks documentation.\r
-       *\r
-       * @var  string  $undocumented\r
-       * @access       public\r
-       */\r
-       var $undocumented = "Warning: documentation is missing.";\r
-\r
-       /**\r
-       * Array of functions found in the xml document.\r
-       *\r
-       * @var  array   $functions\r
-       */\r
-       var $functions = array();\r
-\r
-       /**\r
-       * Array of included files.\r
-       *\r
-       * @var  array   $uses\r
-       */\r
-       var $uses = array();\r
-\r
-       /**\r
-       * Array of constants.\r
-       *\r
-       * @var  array   $constants\r
-       */\r
-       var $constants = array();\r
-\r
-       /**\r
-       * Array of access modifiers.\r
-       *\r
-       * @var  array   $accessModifiers\r
-       */\r
-       var $accessModifiers = array("public", "private");\r
-\r
-       /**\r
-       * Array of doc container fields that get mapped directly to templateblocks.\r
-       *\r
-       * @var  array   $simpleDocfields\r
-       * @see  renderVariableDetail()\r
-       */      \r
-       var $simpleDocfields = array(\r
-                                                                                                                               "VERSION"                       => "version", \r
-                                                                                                                               "SINCE"                         => "since",\r
-                                                                                                                               "DEPRECATED"    => "deprecated", \r
-                                                                                                                               "COPYRIGHT"             => "copyright", \r
-                                                                                                                               "MAGIC"                         => "magic" \r
-                                                                                                                       );\r
-\r
-       /**\r
-       * Types of include statements.\r
-       *\r
-       * @var  array   $usesTypes\r
-       * @see  renderUses()\r
-       */                                                                                                                      \r
-       var $usesTypes = array( "include", "include_once", "require", "require_once" );\r
-\r
-       /**\r
-       * Adds a summary and a detailed list of all constants to the template.\r
-       *\r
-       * @see  renderConstantSummary(), renderConstantDetail()\r
-       */                                                                                                                                                      \r
-       function renderConstants() {\r
-\r
-               $this->constants["public"]      = $this->accessor->getConstantsByAccess("public");\r
-               $this->constants["private"] = $this->accessor->getConstantsByAccess("private");\r
-\r
-               if (0 == count($this->constants["public"]) && 0 == count($this->constants["private"]))\r
-                       return;\r
-\r
-               $this->renderConstantSummary();\r
-               $this->renderConstantDetail();\r
-               $this->constants = array();\r
-\r
-       } // end func renderConstants\r
-\r
-       /**\r
-       * Adds a summary of all constants to the template.\r
-       *\r
-       * The function assumes that there is a block called "constantssummary" and\r
-       * withing this block a bock called "constantssummary_loop" in the template.\r
-       * \r
-       * @see  renderConstantDetail()\r
-       */      \r
-       function renderConstantSummary() {\r
-\r
-               reset($this->accessModifiers);\r
-               while (list($k, $access) = each($this->accessModifiers)) {\r
-                       if (0 == count($this->constants[$access])) \r
-                               continue;\r
-\r
-                       $this->tpl->setCurrentBlock("constantssummary_loop");\r
-\r
-                       reset($this->constants[$access]);\r
-                       while (list($name, $const) = each($this->constants[$access])) {\r
-\r
-                               $this->tpl->setVariable("NAME", $name);\r
-                               $this->tpl->setVariable("VALUE", htmlentities($const["value"]));                        \r
-                               \r
-                               if (isset($const["doc"]["shortdescription"]))\r
-                                       $this->tpl->setVariable("SHORTDESCRIPTION", $this->encode($const["doc"]["shortdescription"]["value"]));\r
-\r
-                               if ("true" == $const["undoc"])\r
-                                       $this->tpl->setVariable("UNDOC", $this->undocumented);\r
-\r
-                               $this->tpl->parseCurrentBlock();\r
-                       }\r
-\r
-                       $this->tpl->setCurrentBlock("constantssummary");\r
-                       $this->tpl->setVariable("ACCESS", ucfirst($access));\r
-                       $this->tpl->parseCurrentBlock();\r
-\r
-               }\r
-\r
-       } // end func renderConstantSummary\r
-\r
-       /** \r
-       * Adds a detailed list of all constants to the template.\r
-       * \r
-       * The function assumes that there is a block named "constantdetails" and\r
-       * withing it another block named "constantdetails_loop". \r
-       *\r
-       * @see  renderConstantSummary()\r
-       */      \r
-       function renderConstantDetail() {\r
-\r
-               reset($this->accessModifiers);\r
-               while (list($k, $access) = each($this->accessModifiers)) {\r
-                       if (0 == count($this->constants[$access]))\r
-                               continue;\r
-\r
-                       reset($this->constants[$access]);\r
-                       while (list($name, $constant) = each($this->constants[$access])) {\r
-\r
-                               $tplvars = array();\r
-                               $tplvars["NAME"]        =       $name;\r
-                               $tplvars["CASE"]        = $constant["case"];\r
-                               $tplvars["VALUE"]       =       htmlentities($constant["value"]);\r
-\r
-                               if ("true" == $constant["undoc"])\r
-                                       $tplvars["UNDOC"] = $this->undocumented;\r
-\r
-                               if (isset($constant["doc"]["shortdescription"]))\r
-                                       $tplvars["SHORTDESCRIPTION"] = $this->encode($constant["doc"]["shortdescription"]["value"]);\r
-\r
-                               if (isset($constant["doc"]["description"]))\r
-                                       $tplvars["DESCRIPTION"] = $this->encode($constant["doc"]["description"]["value"]);\r
-\r
-                               $this->renderCommonDocfields("constantdetails_", $constant);\r
-\r
-                               $this->tpl->setCurrentBlock("constantdetails_loop");\r
-                               $this->tpl->setVariable($tplvars);\r
-                               $this->tpl->parseCurrentBlock();\r
-                       }\r
-\r
-                       $this->tpl->setCurrentBlock("constantdetails");\r
-                       $this->tpl->setVariable("ACCESS", ucfirst($access));\r
-                       $this->tpl->parseCurrentBlock();\r
-               }       \r
-\r
-       } // end func renderConstantsDetail\r
-\r
-       /**\r
-       * Adds a summary and a detailed list of included files to the template.\r
-       * @see  renderUsesSummary(), renderUsesDetail()\r
-       */              \r
-       function renderUses() {\r
-\r
-               $found = false;\r
-               \r
-               reset($this->usesTypes);\r
-               while (list($k, $type) = each($this->usesTypes)) {\r
-\r
-                       $this->uses[$type] = $this->accessor->getUsesByType($type);\r
-                       if (!$found && 0 != count($this->uses[$type]))\r
-                               $found = true;\r
-\r
-               }\r
-\r
-               if (!$found)\r
-                       return;\r
-\r
-               $this->renderUsesSummary();\r
-               $this->renderUsesDetail();\r
-\r
-               $this->uses = array();\r
-       } // end func renderUses                                                                                                                        \r
-\r
-       /**\r
-       * Adds a detailed list of all included files to the template.\r
-       * \r
-       * The function assumes that there is a block names "usesdetail" and within the block \r
-       * a block names "usesdetail_loop" in the template.\r
-       *\r
-       * @see  renderUsesSummary()\r
-       */      \r
-       function renderUsesDetail() {\r
-\r
-               reset($this->usesTypes);\r
-               while (list($k, $type) = each($this->usesTypes)) {\r
-                       if (0 == count($this->uses[$type]))\r
-                               continue;\r
-\r
-                       reset($this->uses[$type]);\r
-                       while (list($file, $uses) = each($this->uses[$type])) {\r
-\r
-                               $tplvars = array();\r
-                               $tplvars["FILE"]        = $uses["file"];\r
-                               $tplvars["TYPE"]        = $type;\r
-\r
-                               if ("true" == $uses["undoc"])\r
-                                       $tplvars["UNDOC"] = $this->undocumented;\r
-\r
-                               if (isset($uses["doc"]["shortdescription"]))\r
-                                       $tplvars["SHORTDESCRIPTION"] = $this->encode($uses["doc"]["shortdescription"]["value"]);\r
-\r
-                               if (isset($uses["doc"]["description"]))\r
-                                       $tplvars["DESCRIPTION"] = $this->encode($uses["doc"]["description"]["value"]);\r
-                               \r
-                               $this->renderCommonDocfields("usesdetails_", $uses);\r
-                               $this->tpl->setCurrentBlock("usesdetails_loop");\r
-                               $this->tpl->setVariable($tplvars);\r
-                               $this->tpl->parseCurrentBlock();\r
-                       }\r
-\r
-                       $this->tpl->setCurrentBlock("usesdetails");\r
-                       $this->tpl->setVariable("TYPE", $type);\r
-                       $this->tpl->parseCurrentBlock();\r
-               }\r
-\r
-       } // end func renderUsesDetail\r
-\r
-       /** \r
-       * Adds a summary of all included files to the template.\r
-       * \r
-       * The function assumes that there is a block names "usessummary" and within\r
-       * the block another block names "usessummary_loop" in the template.\r
-       * \r
-       * @see  renderUsesDetail()\r
-       */      \r
-       function renderUsesSummary() {\r
-\r
-               reset($this->usesTypes);\r
-               while (list($k, $type) = each($this->usesTypes)) {\r
-                       if (0 == count($this->uses[$type]))\r
-                               continue;\r
-\r
-                       $this->tpl->setCurrentBlock("usessummary_loop");\r
-\r
-                       reset($this->uses[$type]);\r
-                       while (list($file, $uses) = each($this->uses[$type])) {\r
-\r
-                               $this->tpl->setVariable("FILE", $file);\r
-                               if (isset($uses["doc"]["shortdescription"]))\r
-                                       $this->tpl->setVariable("SHORTDESCRIPTION", $this->encode($uses["doc"]["shortdescription"]["value"]));\r
-\r
-                               if ("true" == $uses["undoc"])\r
-                                       $this->tpl->setVariable("UNDOC", $this->undocumented);\r
-\r
-                               $this->tpl->parseCurrentBlock();\r
-                       }\r
-\r
-                       $this->tpl->setCurrentBlock("usessummary");\r
-                       $this->tpl->setVariable("TYPE", $type);\r
-                       $this->tpl->parseCurrentBlock();\r
-               }\r
-\r
-       } // end func renderUsesSummary\r
-\r
-       /**\r
-       * Adds a summary and a detailed list of all functions to the template.\r
-       *\r
-       * @see  renderFunctionSummary(), renderFunctionDetail(), $functions\r
-       */\r
-       function renderFunctions() {\r
-\r
-               $this->functions["private"] = $this->accessor->getFunctionsByAccess("private");\r
-               $this->functions["public"]      = $this->accessor->getFunctionsByAccess("public");\r
-\r
-               if (0 == count($this->functions["private"]) && 0 == count($this->functions["public"]))\r
-                       return;\r
-\r
-               $this->renderFunctionSummary();\r
-               $this->renderFunctionDetail();\r
-               $this->functions = array();\r
-               \r
-       } // end func renderFunctions\r
-\r
-       /**\r
-       * Adds a function summary to the template.\r
-       * \r
-       * The function assumes that there is ablock names "functionsummary" and \r
-       * within it a block names "functionsummary_loop" in the template. \r
-       *\r
-       * @see  renderFunctionDetail(), renderFunctions(), $functions, $accessModifiers\r
-       */      \r
-       function renderFunctionSummary() {\r
-\r
-               reset($this->accessModifiers);\r
-               while (list($k, $access) = each($this->accessModifiers)) {\r
-                       if (0 == count($this->functions[$access])) \r
-                               continue;                       \r
-\r
-                       $this->tpl->setCurrentBlock("functionsummary_loop");\r
-                       reset($this->functions[$access]);\r
-                       while (list($name, $function) = each($this->functions[$access])) {\r
-\r
-                               $this->tpl->setVariable("NAME", $name);\r
-                               \r
-                               if (isset($function["doc"]["parameter"]))\r
-                                       $this->tpl->setVariable("PARAMETER", $this->getParameter($function["doc"]["parameter"]));\r
-\r
-                               if (isset($function["doc"]["shortdescription"]))\r
-                                       $this->tpl->setVariable("SHORTDESCRIPTION", $this->encode($function["doc"]["shortdescription"]["value"]));\r
-\r
-                               if (isset($function["doc"]["return"]))\r
-                                       $this->tpl->setVariable("RETURNTYPE", $function["doc"]["return"]["type"]);\r
-                               else\r
-                                       $this->tpl->setVariable("RETURNTYPE", "void");\r
-\r
-                               if ("true" == $function["undoc"])\r
-                                       $this->tpl->setVariable("UNDOC", $this->undocumented);\r
-\r
-                               $this->tpl->parseCurrentBlock();\r
-                       }\r
-\r
-                       $this->tpl->setCurrentBlock("functionsummary");                         \r
-                       $this->tpl->setVariable("ACCESS", ucfirst($access) );\r
-                       $this->tpl->parseCurrentBlock();\r
-               }\r
-\r
-       } // end func renderFunctionSummary\r
-\r
-       /**\r
-       * Adds a detailed list of functions to the template.\r
-       *\r
-       * The function assumes that there is a block named "functiondetails" and \r
-       * within it a bloc "functiondetails_loop" in the template.\r
-       *\r
-       * @see  renderFunctions(), renderFunctionSummary(), $functions, $accessModifiers\r
-       */\r
-       function renderFunctionDetail() {\r
-\r
-               reset($this->accessModifiers);\r
-               while (list($k, $access) = each($this->accessModifiers)) {\r
-                       if (0 == count($this->functions[$access]))\r
-                               continue;\r
-\r
-                       reset($this->functions[$access]);\r
-                       while (list($name, $function) = each($this->functions[$access])) {\r
-\r
-                               $tplvars = array();\r
-                               $tplvars["NAME"]                = $function["name"];\r
-                               $tplvars["ACCESS"]      = $function["access"];\r
-\r
-                               if ("true" == $function["undoc"])\r
-                                       $tplvars["UNDOC"]  = $this->undocumented;\r
-\r
-                               if ("true" == $function["abstract"])\r
-                                       $tplvars["ABSTRACT"] = "abstract";\r
-\r
-                               if ("true" == $function["static"])\r
-                                       $tplvars["STATIC"] = "static";\r
-\r
-                               if (isset($function["doc"]["shortdescription"]))\r
-                                       $tplvars["SHORTDESCRIPTION"] = $this->encode($function["doc"]["shortdescription"]["value"]);\r
-\r
-                               if (isset($function["doc"]["description"]))\r
-                                       $tplvars["DESCRIPTION"] = $this->encode($function["doc"]["description"]["value"]);\r
-\r
-                               $this->renderCommonDocfields("functiondetails_", $function);\r
-                               \r
-                               if (isset($function["doc"]["parameter"])) {\r
-                                       $tplvars["PARAMETER"] = $this->getParameter($function["doc"]["parameter"]);\r
-                                       $this->renderParameterDetail($function["doc"]["parameter"]);\r
-                               }\r
-                               \r
-                               if (isset($function["doc"]["throws"]))\r
-                                       $this->renderThrows($function["doc"]["throws"], "functiondetails_");\r
-\r
-                               if (isset($function["doc"]["global"])) \r
-                                       $this->renderGlobals($function["doc"]["global"], "functiondetails_");\r
-\r
-                               if (isset($function["doc"]["return"])) {\r
-\r
-                                       $tplvars["RETURNTYPE"] = $function["doc"]["return"]["type"];                                    \r
-\r
-                                       $this->tpl->setCurrentBlock("functiondetails_return");\r
-                                       $this->tpl->setVariable("TYPE", $function["doc"]["return"]["type"]);\r
-                                       $this->tpl->setVariable("DESCRIPTION", $this->encode($function["doc"]["return"]["value"]));\r
-\r
-                                       if (isset($function["doc"]["return"]["name"]))\r
-                                               $this->tpl->setVariable("NAME", $function["doc"]["return"]["name"]);\r
-\r
-                                       $this->tpl->parseCurrentBlock();\r
-\r
-                               } else {\r
-\r
-                                       $tplvars["RETURNTYPE"] = "void";\r
-\r
-                               }\r
-\r
-                               $this->tpl->setCurrentBlock("functiondetails_loop");    \r
-                               $this->tpl->setVariable($tplvars);\r
-                               $this->tpl->parseCurrentBlock();        \r
-                       }\r
-\r
-                       $this->tpl->setCurrentBlock("functiondetails");\r
-                       $this->tpl->setVariable("ACCESS", ucfirst($access) );\r
-                       $this->tpl->parseCurrentBlock();\r
-               }\r
-\r
-       } // end func renderFunctionDetail\r
-\r
-       /**\r
-       * Renders a detailed list of function parameters.\r
-       *\r
-       * The function assumes that there is a block named "functiondetails_parameter" in \r
-       * the template and within it a block named "functiondetails_parameter_loop".\r
-       *\r
-       * @param        array   Parameter\r
-       */\r
-       function renderParameterDetail($parameter) {\r
-\r
-               if (!isset($parameter[0]))\r
-                       $parameter = array($parameter);\r
-\r
-               $this->tpl->setCurrentBlock("functiondetails_parameter_loop");\r
-               \r
-               reset($parameter);\r
-               while (list($k, $param) = each($parameter)) {\r
-\r
-                       $this->tpl->setVariable("NAME", $param["name"]);\r
-                       $this->tpl->setVariable("DESCRIPTION", $this->encode($param["value"]));\r
-\r
-                       if (isset($param["type"]))\r
-                               $this->tpl->setVariable("TYPE", $param["type"]);\r
-\r
-                       if (isset($param["default"]))\r
-                               $this->tpl->setVariable("DEFAULT", "= >>".htmlentities($param["default"])."<<");\r
-\r
-                       if ("true" == $param["undoc"])\r
-                               $this->tpl->setVariable("UNDOC", $this->undocumented);\r
-\r
-                       $this->tpl->parseCurrentBlock();                        \r
-               }\r
-\r
-       } // end func renderParameterDetail\r
-\r
-       /**\r
-       * Converts the XML parameter array into formatted string.\r
-       *\r
-       * @param        array   XML parameter array\r
-       * @return       string  Formatted parameter string\r
-       */\r
-       function getParameter($parameter) {\r
-\r
-               if (!is_array($parameter))\r
-                       return "void";\r
-\r
-               $value = "";\r
-\r
-               if (!isset($parameter[0])) {\r
-\r
-                       if (!isset($parameter["default"]))\r
-                               $value .= $parameter["type"] . " " . $parameter["name"];\r
-                       else\r
-                               $value .= "[ ".$parameter["type"] . " " . $parameter["name"]." ]";\r
-\r
-               } else {\r
-\r
-                       $flag_optional = false;\r
-\r
-                       reset($parameter);\r
-                       while (list($k, $param) = each($parameter)) {\r
-\r
-                               if (!isset($param["default"])) {\r
-                                       if ($flag_optional) {\r
-                                               $value = substr($value, 0, -2)." ], ";\r
-                                               $flag_optional = false;\r
-                                       }\r
-                               } else {\r
-                                       if (!$flag_optional) {\r
-                                               $value .= "[ ";\r
-                                               $flag_optional = true;\r
-                                       }\r
-                               }\r
-\r
-                               $value .= $param["type"] . " " . $param["name"].", ";\r
-                       }\r
-\r
-                       $value = substr($value, 0, -2);\r
-                       if ($flag_optional)\r
-                               $value .= " ]";\r
-\r
-               }\r
-\r
-               return $value;          \r
-       } // end func getParameter\r
-\r
-       /**\r
-       * Renders a block with references to other source elements.\r
-       *\r
-       * @param        array           XML references array\r
-       * @param        string  optional template blockname prefix\r
-       */      \r
-       function renderSee($references, $prefix = "") {\r
-\r
-               $value = "";            \r
-               if (!isset($references[0])) {\r
-\r
-                       if (isset($references["group"]))\r
-                               $value .= sprintf('<a href="%s#%s_%s">%s::%s</a>',\r
-                                                                                                               $this->nameToUrl($references["group"]).$this->file_extension,\r
-                                                                                                               $references["type"],\r
-                                                                                                               $references["value"],\r
-                                                                                                               $references["group"],\r
-                                                                                                               $references["value"] \r
-                                                                                               );\r
-                       else \r
-                               $value .= sprintf('<a href="#%s_%s">%s</a>',\r
-                                                                                                               $references["type"],\r
-                                                                                                               $references["value"],\r
-                                                                                                               $references["value"]\r
-                                                                                                       );\r
-\r
-               } else {\r
-                               \r
-                       reset($references);\r
-                       while (list($k, $reference) = each($references)) {\r
-\r
-                               if (isset($reference["group"]))\r
-                                       $value .= sprintf('<a href="%s#%s_%s">%s::%s</a>, ',\r
-                                                                                                                       $this->nameToUrl($reference["group"]).$this->file_extension,\r
-                                                                                                                       $reference["type"],\r
-                                                                                                                       $reference["value"],\r
-                                                                                                                       $reference["group"],\r
-                                                                                                                       $reference["value"] \r
-                                                                                                       );\r
-                               else \r
-                                       $value .= sprintf('<a href="#%s_%s">%s</a>, ',\r
-                                                                                                                       $reference["type"],\r
-                                                                                                                       $reference["value"],\r
-                                                                                                                       $reference["value"]\r
-                                                                                                               );\r
-\r
-                       }       \r
-\r
-                       $value = substr($value, 0, -2);\r
-               }\r
-\r
-               $this->tpl->setCurrentBlock(strtolower($prefix) . "see");\r
-               $this->tpl->setVariable("SEE", $value);\r
-               $this->tpl->parseCurrentBlock();\r
-               \r
-       } // end func renderSee\r
-\r
-       /**\r
-       * Renders an author list.\r
-       *\r
-       * @param        array           XML author array\r
-       * @param        string  optional template blockname prefix\r
-       */      \r
-       function renderAuthors($authors, $prefix = "") {\r
-\r
-               $value = "";\r
-\r
-               if (!isset($authors[0])) {\r
-\r
-                       if (isset($authors["email"]))\r
-                               $value .= sprintf('%s &lt;<a href="mailto:%s">%s</a>&gt;, ', $authors["value"], $authors["email"], $authors["email"]);\r
-                       else \r
-                               $value .= $authors["email"] . ", ";\r
-\r
-               } else {\r
-\r
-                       reset($authors);\r
-                       while (list($k, $author) = each($authors)) {\r
-\r
-                               if (isset($author["email"]))\r
-                                       $value .= sprintf('%s &lt;<a href="mailto:%s">%s</a>&gt;, ', $author["value"], $author["email"], $author["email"]);\r
-                               else \r
-                                       $value .= $author["email"] . ", ";\r
-\r
-                       }\r
-\r
-               }\r
-\r
-               $value = substr($value, 0, -2);\r
-               $this->tpl->setCurrentBlock(strtolower($prefix) . "authors");\r
-               $this->tpl->setVariable("AUTHOR", $value);\r
-               $this->tpl->parseCurrentBlock();\r
-\r
-       } // end func renderAuthors\r
-\r
-       /**\r
-       * Renders a list of external links.\r
-       *\r
-       * @param        array           XML link array\r
-       * @param        string  optional template blockname prefix\r
-       */\r
-       function renderLinks($links, $prefix = "") {\r
-\r
-               $value = "";\r
-               if (!isset($links[0])) {\r
-                       $value .= sprintf('<a href="%s">%s</a>%s, ', \r
-                                                                                                       $links["url"], \r
-                                                                                                       $links["url"], \r
-                                                                                                       ("" != $links["description"]) ? " - " . $links["description"] : ""\r
-                                                                                               );\r
-               } else {\r
-\r
-                       reset($links);\r
-                       while (list($k, $link) = each($links)) {\r
-                               $value .= sprintf('<a href="%s">%s</a>%s, ', \r
-                                                                                                               $link["url"], \r
-                                                                                                               $link["url"], \r
-                                                                                                               ("" != $link["description"]) ? " - " . $links["description"] : ""\r
-                                                                                                       ); \r
-                       }\r
-\r
-               }\r
-\r
-               $value = substr($value, 0, 2);\r
-               $this->tpl->setCurrentBlock(strtolower($prefix) . "links");\r
-               $this->tpl->setVariable("LINK", $value);\r
-               $this->tpl->parseCurrentBlock();\r
-\r
-       } // end func renderLinks\r
-\r
-       /**\r
-       * Renders a list of exceptions.\r
-       *\r
-       * @param        array           XML array \r
-       * @param        string  optional template blockname prefix\r
-       */\r
-       function renderThrows($throws, $prefix = "") {\r
-\r
-               $value = "";\r
-               if (!isset($throws[0])) {\r
-               \r
-                       $value = $throws["value"];\r
-                       \r
-               }       else {\r
-\r
-                       reset($throws);\r
-                       while (list($k, $exception) = each($throws)) \r
-                               $value .= sprintf("%s, ", $exception["value"]);\r
-\r
-                       $value = substr($value, 0, -2);\r
-\r
-               }       \r
-\r
-               $this->tpl->setCurrentBlock(strtolower($prefix) . "throws");\r
-               $this->tpl->setVariable("EXCEPTIONS", $value);\r
-               $this->tpl->parseCurrentBlock();\r
-\r
-       } // end func renderThrows\r
-\r
-       /**\r
-       * Renders a list of global elements.\r
-       *\r
-       * @param        array           XML globals array\r
-       * @param        string  optional template blockname prefix\r
-       */\r
-       function renderGlobals($globals, $prefix = "") {\r
-\r
-               $prefix = strtolower($prefix);\r
-               $this->tpl->setCurrentBlock($prefix . "globals_loop");\r
-\r
-               if (!isset($globals[0])) {\r
-\r
-                       $this->tpl->setVariable("NAME", $globals["name"]);\r
-                       $this->tpl->setVariable("DESCRIPTION", $this->encode($globals["value"]));\r
-\r
-                       if (isset($globals["type"]))\r
-                               $this->tpl->setVariable("TYPE", $globals["type"]);\r
-\r
-                       $this->tpl->parseCurrentBlock();\r
-\r
-               } else {\r
-\r
-                       reset($globals);\r
-                       while (list($k, $global) = each($globals)) {\r
-\r
-                               $this->tpl->setVariable("NAME", $global["name"]);\r
-                               $this->tpl->setVariable("DESCRIPTION", $this->encode($global["value"]));\r
-\r
-                               if (isset($globals["type"]))\r
-                                       $this->tpl->setVariable("TYPE", $globals["type"]);\r
-\r
-                               $this->tpl->parseCurrentBlock();\r
-\r
-                       }\r
-\r
-               }\r
-\r
-       } // end func renderGlobals\r
-\r
-       /**\r
-       * Adds some tags to the template that are allowed nearly everywhere.\r
-       *\r
-       * @param        string  template blockname prefixs\r
-       * @param        array           \r
-       * @see  $simpleDocfields, renderLinks(), renderAuthors(), renderSee()\r
-       */      \r
-       function renderCommonDocfields($block, &$data) {\r
-\r
-               reset($this->simpleDocfields);\r
-               while (list($varname, $field) = each($this->simpleDocfields)) {\r
-\r
-                       if (isset($data["doc"][$field])) {\r
-\r
-                               $this->tpl->setCurrentBlock($block.$field);\r
-                               $this->tpl->setVariable($varname, htmlentities($data["doc"][$field]["value"]));\r
-                               $this->tpl->parseCurrentBlock();\r
-\r
-                       }\r
-\r
-               }\r
-\r
-               if (isset($data["doc"]["link"]))\r
-                       $this->renderLinks($data["doc"]["link"], $block);\r
-\r
-               if (isset($data["doc"]["author"])) \r
-                       $this->renderAuthors($data["doc"]["author"], $block);\r
-\r
-               if (isset($data["doc"]["see"]))\r
-                       $this->renderSee($data["doc"]["see"], $block);\r
-\r
-       } // end func renderCommonDocfields\r
-\r
-} // end func PhpdocHTMLDocumentRenderer\r
-?>
\ No newline at end of file