removed mods directory from the ATutor codebase
[atutor.git] / mods / phpdoc2 / PhpDocumentor / phpDocumentor / DescHTML.inc
diff --git a/mods/phpdoc2/PhpDocumentor/phpDocumentor/DescHTML.inc b/mods/phpdoc2/PhpDocumentor/phpDocumentor/DescHTML.inc
deleted file mode 100644 (file)
index fe4a2fc..0000000
+++ /dev/null
@@ -1,423 +0,0 @@
-<?php\r
-/**\r
- * All abstract representations of html tags in DocBlocks are handled by the\r
- * classes in this file\r
- *\r
- * Before version 1.2, phpDocumentor simply passed html to converters, without\r
- * much thought, except the {@link adv_htmlentities()} function was provided\r
- * along with a list of allowed html.  That list is no longer used, in favor\r
- * of these classes.\r
- *\r
- * The PDF Converter output looked wretched in version 1.1.0 because line breaks\r
- * in DocBlocks were honored.  This meant that output often had just a few words\r
- * on every other line!  To fix this problem, DocBlock descriptions are now\r
- * parsed using the {@link ParserDescParser}, and split into paragraphs.  In\r
- * addition, html in DocBlocks are parsed into these objects to allow for easy\r
- * conversion in destination converters.  This design also allows different\r
- * conversion for different templates within a converter, which separates\r
- * design from logic almost 100%\r
- *\r
- * phpDocumentor :: automatic documentation generator\r
- * \r
- * PHP versions 4 and 5\r
- *\r
- * Copyright (c) 2002-2007 Gregory Beaver\r
- * \r
- * LICENSE:\r
- * \r
- * This library is free software; you can redistribute it\r
- * and/or modify it under the terms of the GNU Lesser General\r
- * Public License as published by the Free Software Foundation;\r
- * either version 2.1 of the License, or (at your option) any\r
- * later version.\r
- * \r
- * This library is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
- * Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; if not, write to the Free Software\r
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
- * \r
- * @category   ToolsAndUtilities\r
- * @package    phpDocumentor\r
- * @subpackage DescHTML\r
- * @author     Greg Beaver <cellog@php.net>\r
- * @copyright  2002-2007 Gregory Beaver\r
- * @license    http://www.opensource.org/licenses/lgpl-license.php LGPL\r
- * @version    CVS: $Id: DescHTML.inc,v 1.5 2007/11/17 03:07:00 ashnazg Exp $\r
- * @filesource\r
- * @link       http://www.phpdoc.org\r
- * @link       http://pear.php.net/PhpDocumentor\r
- * @see        parserDocBlock, parserInclude, parserPage, parserClass\r
- * @see        parserDefine, parserFunction, parserMethod, parserVar\r
- * @since      1.2\r
- * @todo       CS cleanup - change package to PhpDocumentor\r
- */\r
-/**\r
- * Used for <<code>> in a description\r
- *\r
- * @category   ToolsAndUtilities\r
- * @package    phpDocumentor\r
- * @subpackage DescHTML\r
- * @author     Greg Beaver <cellog@php.net>\r
- * @copyright  2002-2007 Gregory Beaver\r
- * @license    http://www.opensource.org/licenses/lgpl-license.php LGPL\r
- * @version    Release: 1.4.1\r
- * @link       http://www.phpdoc.org\r
- * @link       http://pear.php.net/PhpDocumentor\r
- * @since      1.2\r
- * @todo       CS cleanup - change package to PhpDocumentor\r
- * @todo       CS cleanup - rename class to ParserCode\r
- */\r
-class parserCode extends parserStringWithInlineTags\r
-{\r
-    /**\r
-     * performs the conversion of code tags\r
-     *\r
-     * @param Converter &$c the converter object\r
-     *\r
-     * @return string the converted code block\r
-     * @uses Converter::ProgramExample()\r
-     * @todo CS cleanup - rename method to convert()\r
-     */\r
-    function Convert(&$c)\r
-    {\r
-        if (!isset($this->value[0])) {\r
-            return '';\r
-        }\r
-        if (is_string($this->value[0]) && $this->value[0]{0} == "\n") {\r
-            $this->value[0] = substr($this->value[0], 1);\r
-        }\r
-        $linktags = array();\r
-        foreach ($this->value as $val) {\r
-            if (phpDocumentor_get_class($val) == 'parserlinkinlinetag'\r
-                || phpDocumentor_get_class($val) == 'parsertutorialinlinetag'\r
-            ) {\r
-                $linktags[] = array(\r
-                    $c->postProcess($val->Convert($c, false, false)), $val);\r
-            }\r
-        }\r
-        $a = $c->ProgramExample(rtrim(ltrim(parent::Convert($c,\r
-            false, false), "\n\r")));\r
-        foreach ($linktags as $tag) {\r
-            $a = str_replace($tag[0], $tag[1]->Convert($c, false, false), $a);\r
-        }\r
-        return $a;\r
-    }\r
-}\r
-\r
-/**\r
- * Used for <<pre>> in a description\r
- *\r
- * @category   ToolsAndUtilities\r
- * @package    phpDocumentor\r
- * @subpackage DescHTML\r
- * @author     Greg Beaver <cellog@php.net>\r
- * @copyright  2002-2007 Gregory Beaver\r
- * @license    http://www.opensource.org/licenses/lgpl-license.php LGPL\r
- * @version    Release: 1.4.1\r
- * @link       http://www.phpdoc.org\r
- * @link       http://pear.php.net/PhpDocumentor\r
- * @since      1.2\r
- * @todo       CS cleanup - change package to PhpDocumentor\r
- * @todo       CS cleanup - rename class to ParserPre\r
- */\r
-class parserPre extends parserStringWithInlineTags\r
-{\r
-    /**\r
-     * performs the conversion of code tags\r
-     *\r
-     * @param Converter &$c the converter object\r
-     *\r
-     * @return string the converted pre block\r
-     * @uses Converter::PreserveWhiteSpace()\r
-     * @todo CS cleanup - rename method to convert()\r
-     */\r
-    function Convert(&$c)\r
-    {\r
-        return $c->PreserveWhiteSpace(rtrim(ltrim(parent::Convert($c,\r
-            false, false), "\n\r")));\r
-    }\r
-}\r
-\r
-/**\r
- * Used for <<b>> in a description\r
- *\r
- * @category   ToolsAndUtilities\r
- * @package    phpDocumentor\r
- * @subpackage DescHTML\r
- * @author     Greg Beaver <cellog@php.net>\r
- * @copyright  2002-2007 Gregory Beaver\r
- * @license    http://www.opensource.org/licenses/lgpl-license.php LGPL\r
- * @version    Release: 1.4.1\r
- * @link       http://www.phpdoc.org\r
- * @link       http://pear.php.net/PhpDocumentor\r
- * @since      1.2\r
- * @todo       CS cleanup - change package to PhpDocumentor\r
- * @todo       CS cleanup - rename class to ParserB\r
- */\r
-class parserB extends parserStringWithInlineTags\r
-{\r
-    /**\r
-     * performs the conversion of bold tags\r
-     *\r
-     * @param Converter &$c the converter object\r
-     *\r
-     * @return string the converted pre block\r
-     * @uses Converter::Bolden()\r
-     * @todo CS cleanup - rename method to convert()\r
-     */\r
-    function Convert(&$c)\r
-    {\r
-        return $c->Bolden(parent::Convert($c));\r
-    }\r
-}\r
-\r
-/**\r
- * Used for <<i>> in a description\r
- *\r
- * @category   ToolsAndUtilities\r
- * @package    phpDocumentor\r
- * @subpackage DescHTML\r
- * @author     Greg Beaver <cellog@php.net>\r
- * @copyright  2002-2007 Gregory Beaver\r
- * @license    http://www.opensource.org/licenses/lgpl-license.php LGPL\r
- * @version    Release: 1.4.1\r
- * @link       http://www.phpdoc.org\r
- * @link       http://pear.php.net/PhpDocumentor\r
- * @since      1.2\r
- * @todo       CS cleanup - change package to PhpDocumentor\r
- * @todo       CS cleanup - rename class to ParserI\r
- */\r
-class parserI extends parserStringWithInlineTags\r
-{\r
-    /**\r
-     * performs the conversion of italic tags\r
-     *\r
-     * @param Converter &$c the converter object\r
-     *\r
-     * @return string the converted pre block\r
-     * @uses Converter::Italicize()\r
-     * @todo CS cleanup - rename method to convert()\r
-     */\r
-    function Convert(&$c)\r
-    {\r
-        return $c->Italicize(parent::Convert($c));\r
-    }\r
-}\r
-\r
-/**\r
- * Used for <<var>> in a description\r
- *\r
- * @category   ToolsAndUtilities\r
- * @package    phpDocumentor\r
- * @subpackage DescHTML\r
- * @author     Greg Beaver <cellog@php.net>\r
- * @copyright  2002-2007 Gregory Beaver\r
- * @license    http://www.opensource.org/licenses/lgpl-license.php LGPL\r
- * @version    Release: 1.4.1\r
- * @link       http://www.phpdoc.org\r
- * @link       http://pear.php.net/PhpDocumentor\r
- * @since      1.2\r
- * @todo       CS cleanup - change package to PhpDocumentor\r
- * @todo       CS cleanup - rename class to ParserDescVar\r
- */\r
-class parserDescVar extends parserStringWithInlineTags\r
-{\r
-    /**\r
-     * performs the conversion of variable tags\r
-     *\r
-     * @param Converter &$c the converter object\r
-     *\r
-     * @return string the converted pre block\r
-     * @uses Converter::Varize()\r
-     * @todo CS cleanup - rename method to convert()\r
-     */\r
-    function Convert(&$c)\r
-    {\r
-        return $c->Varize(parent::Convert($c));\r
-    }\r
-}\r
-\r
-/**\r
- * Used for <<samp>> in a description\r
- *\r
- * @category   ToolsAndUtilities\r
- * @package    phpDocumentor\r
- * @subpackage DescHTML\r
- * @author     Greg Beaver <cellog@php.net>\r
- * @copyright  2002-2007 Gregory Beaver\r
- * @license    http://www.opensource.org/licenses/lgpl-license.php LGPL\r
- * @version    Release: 1.4.1\r
- * @link       http://www.phpdoc.org\r
- * @link       http://pear.php.net/PhpDocumentor\r
- * @since      1.2\r
- * @todo       CS cleanup - change package to PhpDocumentor\r
- * @todo       CS cleanup - rename class to ParserSamp\r
- */\r
-class parserSamp extends parserStringWithInlineTags\r
-{\r
-    /**\r
-     * performs the conversion of sample tags\r
-     *\r
-     * @param Converter &$c the converter object\r
-     *\r
-     * @return string the converted pre block\r
-     * @uses Converter::Sampize()\r
-     * @todo CS cleanup - rename method to convert()\r
-     */\r
-    function Convert(&$c)\r
-    {\r
-        return $c->Sampize(parent::Convert($c));\r
-    }\r
-}\r
-\r
-/**\r
- * Used for <<kbd>> in a description\r
- *\r
- * @category   ToolsAndUtilities\r
- * @package    phpDocumentor\r
- * @subpackage DescHTML\r
- * @author     Greg Beaver <cellog@php.net>\r
- * @copyright  2002-2007 Gregory Beaver\r
- * @license    http://www.opensource.org/licenses/lgpl-license.php LGPL\r
- * @version    Release: 1.4.1\r
- * @link       http://www.phpdoc.org\r
- * @link       http://pear.php.net/PhpDocumentor\r
- * @since      1.2\r
- * @todo       CS cleanup - change package to PhpDocumentor\r
- * @todo       CS cleanup - rename class to ParserKbd\r
- */\r
-class parserKbd extends parserStringWithInlineTags\r
-{\r
-    /**\r
-     * performs the conversion of keyboard tags\r
-     *\r
-     * @param Converter &$c the converter object\r
-     *\r
-     * @return string the converted pre block\r
-     * @uses Converter::Kbdize()\r
-     * @todo CS cleanup - rename method to convert()\r
-     */\r
-    function Convert(&$c)\r
-    {\r
-        return $c->Kbdize(parent::Convert($c));\r
-    }\r
-}\r
-\r
-/**\r
- * Used for <<br>> in a description\r
- *\r
- * @category   ToolsAndUtilities\r
- * @package    phpDocumentor\r
- * @subpackage DescHTML\r
- * @author     Greg Beaver <cellog@php.net>\r
- * @copyright  2002-2007 Gregory Beaver\r
- * @license    http://www.opensource.org/licenses/lgpl-license.php LGPL\r
- * @version    Release: 1.4.1\r
- * @link       http://www.phpdoc.org\r
- * @link       http://pear.php.net/PhpDocumentor\r
- * @since      1.2\r
- * @todo       CS cleanup - change package to PhpDocumentor\r
- * @todo       CS cleanup - rename class to ParserBr\r
- */\r
-class parserBr extends parserStringWithInlineTags\r
-{\r
-    /**\r
-     * performs the conversion of linebreak tags\r
-     *\r
-     * @param Converter &$c the converter object\r
-     *\r
-     * @return string the converted pre block\r
-     * @uses Converter::Br()\r
-     * @todo CS cleanup - rename method to convert()\r
-     */\r
-    function Convert(&$c)\r
-    {\r
-        return $c->Br($this->getString());\r
-    }\r
-}\r
-\r
-/**\r
- * Used for lists <<ol>> and <<ul>>\r
- *\r
- * @category   ToolsAndUtilities\r
- * @package    phpDocumentor\r
- * @subpackage DescHTML\r
- * @author     Greg Beaver <cellog@php.net>\r
- * @copyright  2002-2007 Gregory Beaver\r
- * @license    http://www.opensource.org/licenses/lgpl-license.php LGPL\r
- * @version    Release: 1.4.1\r
- * @link       http://www.phpdoc.org\r
- * @link       http://pear.php.net/PhpDocumentor\r
- * @since      1.2\r
- * @todo       CS cleanup - change package to PhpDocumentor\r
- * @todo       CS cleanup - rename class to ParserList\r
- */\r
-class parserList extends parserStringWithInlineTags\r
-{\r
-    /**\r
-     * @var boolean\r
-     */\r
-    var $numbered;\r
-    /**\r
-     * @var integer\r
-     */\r
-    var $items = 0;\r
-    /**\r
-     * Constructor - create a new list\r
-     *\r
-     * @param integer $numbered a reference number for the new list\r
-     */\r
-    function parserList($numbered)\r
-    {\r
-        $this->numbered = $numbered;\r
-    }\r
-    \r
-    /**\r
-     * add an item to a list\r
-     *\r
-     * @param parserStringWithInlineTags $item the item to add\r
-     *\r
-     * @return void\r
-     */\r
-    function addItem($item)\r
-    {\r
-        $this->value[$this->items++] = $item;\r
-    }\r
-    \r
-    /**\r
-     * add a list\r
-     *\r
-     * @param parserList $list the list to add\r
-     *\r
-     * @return void\r
-     */\r
-    function addList($list)\r
-    {\r
-        $this->value[$this->items++] = $list;\r
-    }\r
-    \r
-    /**\r
-     * performs the conversion of list tags\r
-     *\r
-     * @param Converter &$c the converter object\r
-     *\r
-     * @return string the converted pre block\r
-     * @uses Converter::ListItem() enclose each item of the list\r
-     * @uses Converter::EncloseList() enclose the list\r
-     * @todo CS cleanup - rename method to convert()\r
-     */\r
-    function Convert(&$c)\r
-    {\r
-        $list = '';\r
-        foreach ($this->value as $item) {\r
-            $list .= $c->ListItem(trim($item->Convert($c)));\r
-        }\r
-        return $c->EncloseList($list, $this->numbered);\r
-    }\r
-}\r
-\r
-?>\r