phpDocumentor page
[ class tree: page ] [ index: page ] [ all elements ]

Source for file Tag.php

Documentation is available at Tag.php

  1. <?
  2. /**
  3. * @package page
  4. * @filesource
  5. * @see HTML_PAGE_UTIL_PATH.'/Tag.php'
  6. * @copyright (c) http://Finn-Rasmussen.com
  7. * @license http://Finn-Rasmussen.com/license/ myPHP License conditions
  8. * @author http://Finn-Rasmussen.com
  9. * @version 1.9
  10. * @since 21-oct-2005
  11. */
  12.  
  13. /**
  14. * The required files
  15. */
  16. require_once(HTML_PAGE_UTIL_PATH.'/Text.php');
  17.  
  18. /**
  19. * This is just a wrapper class in order to allow usage of one 'Tag::xyz()'
  20. * Generates a plain Tag object, surronded by a html element tag
  21. * <code>
  22. * Usage:
  23. * $tag = new Tag('the li Text','li',$class);
  24. * print $tag->getHtml();
  25. * Or
  26. * Tag::li('the li Text'); // display <li>the li Text</li>
  27. * </code>
  28. * @package page
  29. */
  30.  
  31. class Tag extends Text {
  32. /**
  33. * Constructor
  34. * @param String $text The text to show
  35. * @param String $element The html element, if any
  36. * @param String $class The css class name
  37. */
  38. function Tag($text='',$element='',$class='') {
  39. $this->Text($text,$element,$class);
  40. }
  41.  
  42. /**
  43. * Display html
  44. * <code>
  45. * Usage:
  46. * Tag::display($text,$element,$class);
  47. * </code>
  48. * @static
  49. * @param String $text The text for the li
  50. * @param String $element The html element, if any
  51. * @param String $class The css class of the link
  52. */
  53. function display($text='',$element='',$class='') {
  54. $html = new Tag($text,$element,$class);
  55. $html->addHtml();
  56. }
  57. }
  58. ?>

Documentation generated on Thu, 22 Dec 2005 17:19:56 +0100 by phpDocumentor 1.3.0RC3