hidden.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
  3. /**
  4. * HTML class for a hidden type element
  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 Adam Daniel <adaniel1@eesus.jnj.com>
  17. * @author Bertrand Mansion <bmansion@mamasam.com>
  18. * @copyright 2001-2009 The PHP Group
  19. * @license http://www.php.net/license/3_01.txt PHP License 3.01
  20. * @version CVS: $Id: hidden.php,v 1.12 2009/04/04 21:34:03 avb Exp $
  21. * @link http://pear.php.net/package/HTML_QuickForm
  22. */
  23. /**
  24. * HTML class for a hidden type element
  25. *
  26. * @category HTML
  27. * @package HTML_QuickForm
  28. * @author Adam Daniel <adaniel1@eesus.jnj.com>
  29. * @author Bertrand Mansion <bmansion@mamasam.com>
  30. * @version Release: 3.2.11
  31. * @since 1.0
  32. */
  33. class HTML_QuickForm_hidden extends HTML_QuickForm_input
  34. {
  35. // {{{ constructor
  36. /**
  37. * Class constructor
  38. *
  39. * @param string $elementName (optional)Input field name attribute
  40. * @param string $value (optional)Input field value
  41. * @param mixed $attributes (optional)Either a typical HTML attribute string
  42. * or an associative array
  43. * @since 1.0
  44. * @access public
  45. * @return void
  46. */
  47. public function HTML_QuickForm_hidden($elementName = null, $value = '', $attributes = null)
  48. {
  49. parent::__construct($elementName, null, $attributes);
  50. $this->setType('hidden');
  51. $this->setValue($value);
  52. } //end constructor
  53. // }}}
  54. // {{{ freeze()
  55. /**
  56. * Freeze the element so that only its value is returned
  57. *
  58. * @access public
  59. * @return void
  60. */
  61. function freeze()
  62. {
  63. return false;
  64. } //end func freeze
  65. // }}}
  66. // {{{ accept()
  67. /**
  68. * Accepts a renderer
  69. *
  70. * @param HTML_QuickForm_Renderer renderer object
  71. * @access public
  72. * @return void
  73. */
  74. //function accept(&$renderer)
  75. function accept(&$renderer, $required=false, $error=null)
  76. {
  77. $renderer->renderHidden($this);
  78. } // end func accept
  79. // }}}
  80. } //end class HTML_QuickForm_hidden
  81. ?>