hidden.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. // +----------------------------------------------------------------------+
  4. // | PHP version 4.0 |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group |
  7. // +----------------------------------------------------------------------+
  8. // | This source file is subject to version 2.0 of the PHP license, |
  9. // | that is bundled with this package in the file LICENSE, and is |
  10. // | available at through the world-wide-web at |
  11. // | http://www.php.net/license/2_02.txt. |
  12. // | If you did not receive a copy of the PHP license and are unable to |
  13. // | obtain it through the world-wide-web, please send a note to |
  14. // | license@php.net so we can mail you a copy immediately. |
  15. // +----------------------------------------------------------------------+
  16. // | Authors: Adam Daniel <adaniel1@eesus.jnj.com> |
  17. // | Bertrand Mansion <bmansion@mamasam.com> |
  18. // +----------------------------------------------------------------------+
  19. //
  20. // $Id: hidden.php 6184 2005-09-07 10:08:17Z bmol $
  21. require_once("HTML/QuickForm/input.php");
  22. /**
  23. * HTML class for a hidden type element
  24. *
  25. * @author Adam Daniel <adaniel1@eesus.jnj.com>
  26. * @author Bertrand Mansion <bmansion@mamasam.com>
  27. * @version 1.0
  28. * @since PHP4.04pl1
  29. * @access public
  30. */
  31. class HTML_QuickForm_hidden extends HTML_QuickForm_input
  32. {
  33. // {{{ constructor
  34. /**
  35. * Class constructor
  36. *
  37. * @param string $elementName (optional)Input field name attribute
  38. * @param string $value (optional)Input field value
  39. * @param mixed $attributes (optional)Either a typical HTML attribute string
  40. * or an associative array
  41. * @since 1.0
  42. * @access public
  43. * @return void
  44. */
  45. function HTML_QuickForm_hidden($elementName=null, $value='', $attributes=null)
  46. {
  47. HTML_QuickForm_input::HTML_QuickForm_input($elementName, null, $attributes);
  48. $this->setType('hidden');
  49. $this->setValue($value);
  50. } //end constructor
  51. // }}}
  52. // {{{ freeze()
  53. /**
  54. * Freeze the element so that only its value is returned
  55. *
  56. * @access public
  57. * @return void
  58. */
  59. function freeze()
  60. {
  61. return false;
  62. } //end func freeze
  63. // }}}
  64. // {{{ accept()
  65. /**
  66. * Accepts a renderer
  67. *
  68. * @param object An HTML_QuickForm_Renderer object
  69. * @access public
  70. * @return void
  71. */
  72. function accept(&$renderer)
  73. {
  74. $renderer->renderHidden($this);
  75. } // end func accept
  76. // }}}
  77. } //end class HTML_QuickForm_hidden
  78. ?>