- <?
- /**
- * @package page
- * @filesource
- * @see HTML_PAGE_UTIL_PATH.'/Tag.php'
- * @copyright (c) http://Finn-Rasmussen.com
- * @license http://Finn-Rasmussen.com/license/ myPHP License conditions
- * @author http://Finn-Rasmussen.com
- * @version 1.9
- * @since 21-oct-2005
- */
-
- /**
- * The required files
- */
- require_once(HTML_PAGE_UTIL_PATH.'/Text.php');
-
- /**
- * This is just a wrapper class in order to allow usage of one 'Tag::xyz()'
- * Generates a plain Tag object, surronded by a html element tag
- * <code>
- * Usage:
- * $tag = new Tag('the li Text','li',$class);
- * print $tag->getHtml();
- * Or
- * Tag::li('the li Text'); // display <li>the li Text</li>
- * </code>
- * @package page
- */
-
- class Tag extends Text {
- /**
- * Constructor
- * @param String $text The text to show
- * @param String $element The html element, if any
- * @param String $class The css class name
- */
- function Tag($text='',$element='',$class='') {
- $this->Text($text,$element,$class);
- }
-
- /**
- * Display html
- * <code>
- * Usage:
- * Tag::display($text,$element,$class);
- * </code>
- * @static
- * @param String $text The text for the li
- * @param String $element The html element, if any
- * @param String $class The css class of the link
- */
- function display($text='',$element='',$class='') {
- $html = new Tag($text,$element,$class);
- $html->addHtml();
- }
- }
- ?>