html.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. * A pseudo-element used for adding raw HTML to form
  24. *
  25. * Intended for use with the default renderer only, template-based
  26. * ones may (and probably will) completely ignore this
  27. *
  28. * @category HTML
  29. * @package HTML_QuickForm
  30. * @author Alexey Borzov <avb@php.net>
  31. * @version Release: 3.2.11
  32. * @since 3.0
  33. * @deprecated Please use the templates rather than add raw HTML via this element
  34. */
  35. class HTML_QuickForm_html extends HTML_QuickForm_static
  36. {
  37. /**
  38. * Class constructor
  39. *
  40. * @param string $text raw HTML to add
  41. * @access public
  42. * @return void
  43. */
  44. public function __construct($text = null)
  45. {
  46. parent::__construct(null, null, $text);
  47. $this->_type = 'html';
  48. }
  49. /**
  50. * Accepts a renderer
  51. *
  52. * @param HTML_QuickForm_Renderer renderer object (only works with Default renderer!)
  53. * @access public
  54. * @return void
  55. */
  56. public function accept(&$renderer, $required = false, $error = null)
  57. {
  58. $renderer->renderHtml($this);
  59. }
  60. }