html.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
  3. /**
  4. * A pseudo-element used for adding raw HTML 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: html.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 raw HTML to form
  28. *
  29. * Intended for use with the default renderer only, template-based
  30. * ones may (and probably will) completely ignore this
  31. *
  32. * @category HTML
  33. * @package HTML_QuickForm
  34. * @author Alexey Borzov <avb@php.net>
  35. * @version Release: 3.2.11
  36. * @since 3.0
  37. * @deprecated Please use the templates rather than add raw HTML via this element
  38. */
  39. class HTML_QuickForm_html extends HTML_QuickForm_static
  40. {
  41. // {{{ constructor
  42. /**
  43. * Class constructor
  44. *
  45. * @param string $text raw HTML to add
  46. * @access public
  47. * @return void
  48. */
  49. function HTML_QuickForm_html($text = null)
  50. {
  51. $this->HTML_QuickForm_static(null, null, $text);
  52. $this->_type = 'html';
  53. }
  54. // }}}
  55. // {{{ accept()
  56. /**
  57. * Accepts a renderer
  58. *
  59. * @param HTML_QuickForm_Renderer renderer object (only works with Default renderer!)
  60. * @access public
  61. * @return void
  62. */
  63. function accept(&$renderer, $required = false, $error = null)
  64. {
  65. $renderer->renderHtml($this);
  66. } // end func accept
  67. function toHtml()
  68. {
  69. return HTML_QuickForm_static::toHtml();
  70. } //end func toHtml
  71. // }}}
  72. } //end class HTML_QuickForm_html