header.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. {
  48. $this->HTML_QuickForm_static($elementName, null, $text);
  49. $this->_type = 'header';
  50. }
  51. // }}}
  52. // {{{ accept()
  53. /**
  54. * Accepts a renderer
  55. *
  56. * @param HTML_QuickForm_Renderer renderer object
  57. * @access public
  58. * @return void
  59. */
  60. function accept(&$renderer)
  61. {
  62. $renderer->renderHeader($this);
  63. } // end func accept
  64. // }}}
  65. } //end class HTML_QuickForm_header
  66. ?>