header.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
  3. /**
  4. * A pseudo-element used for adding headers to form
  5. *
  6. * PHP versions 4 and 5
  7. *
  8. * LICENSE: This source file is subject to version 3.01 of the PHP license
  9. * that is available through the world-wide-web at the following URI:
  10. * http://www.php.net/license/3_01.txt If you did not receive a copy of
  11. * the PHP License and are unable to obtain it through the web, please
  12. * send a note to license@php.net so we can mail you a copy immediately.
  13. *
  14. * @category HTML
  15. * @package HTML_QuickForm
  16. * @author Alexey Borzov <avb@php.net>
  17. * @copyright 2001-2009 The PHP Group
  18. * @license http://www.php.net/license/3_01.txt PHP License 3.01
  19. * @version CVS: $Id: header.php,v 1.3 2009/04/04 21:34:03 avb Exp $
  20. * @link http://pear.php.net/package/HTML_QuickForm
  21. */
  22. /**
  23. * HTML class for static data
  24. */
  25. require_once 'HTML/QuickForm/static.php';
  26. /**
  27. * A pseudo-element used for adding headers to form
  28. *
  29. * @category HTML
  30. * @package HTML_QuickForm
  31. * @author Alexey Borzov <avb@php.net>
  32. * @version Release: 3.2.11
  33. * @since 3.0
  34. */
  35. class HTML_QuickForm_header extends HTML_QuickForm_static
  36. {
  37. // {{{ constructor
  38. /**
  39. * Class constructor
  40. *
  41. * @param string $elementName Header name
  42. * @param string $text Header text
  43. * @access public
  44. * @return void
  45. */
  46. function HTML_QuickForm_header($elementName = null, $text = null) {
  47. if (!empty($elementName)) {
  48. $text = $elementName;
  49. }
  50. $this->HTML_QuickForm_static($elementName, null, $text);
  51. $this->_type = 'header';
  52. }
  53. // }}}
  54. // {{{ accept()
  55. /**
  56. * Accepts a renderer
  57. *
  58. * @param HTML_QuickForm_Renderer renderer object
  59. * @access public
  60. * @return void
  61. */
  62. function accept(&$renderer, $required=false, $error=null)
  63. {
  64. $renderer->renderHeader($this);
  65. } // end func accept
  66. // }}}
  67. } //end class HTML_QuickForm_header
  68. ?>