PageRenderTime 59ms CodeModel.GetById 34ms RepoModel.GetById 1ms app.codeStats 0ms

/campsite/src/include/pear/HTML/QuickForm/hidden.php

https://github.com/joechrysler/Campsite
PHP | 94 lines | 20 code | 10 blank | 64 comment | 0 complexity | af321e520a5488f4613e22578397183f MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, LGPL-2.1, Apache-2.0
  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. * Base class for <input /> form elements
  25. */
  26. require_once 'HTML/QuickForm/input.php';
  27. /**
  28. * HTML class for a hidden type element
  29. *
  30. * @category HTML
  31. * @package HTML_QuickForm
  32. * @author Adam Daniel <adaniel1@eesus.jnj.com>
  33. * @author Bertrand Mansion <bmansion@mamasam.com>
  34. * @version Release: 3.2.11
  35. * @since 1.0
  36. */
  37. class HTML_QuickForm_hidden extends HTML_QuickForm_input
  38. {
  39. // {{{ constructor
  40. /**
  41. * Class constructor
  42. *
  43. * @param string $elementName (optional)Input field name attribute
  44. * @param string $value (optional)Input field value
  45. * @param mixed $attributes (optional)Either a typical HTML attribute string
  46. * or an associative array
  47. * @since 1.0
  48. * @access public
  49. * @return void
  50. */
  51. function HTML_QuickForm_hidden($elementName=null, $value='', $attributes=null)
  52. {
  53. HTML_QuickForm_input::HTML_QuickForm_input($elementName, null, $attributes);
  54. $this->setType('hidden');
  55. $this->setValue($value);
  56. } //end constructor
  57. // }}}
  58. // {{{ freeze()
  59. /**
  60. * Freeze the element so that only its value is returned
  61. *
  62. * @access public
  63. * @return void
  64. */
  65. function freeze()
  66. {
  67. return false;
  68. } //end func freeze
  69. // }}}
  70. // {{{ accept()
  71. /**
  72. * Accepts a renderer
  73. *
  74. * @param HTML_QuickForm_Renderer renderer object
  75. * @access public
  76. * @return void
  77. */
  78. function accept(&$renderer)
  79. {
  80. $renderer->renderHidden($this);
  81. } // end func accept
  82. // }}}
  83. } //end class HTML_QuickForm_hidden
  84. ?>