PageRenderTime 172ms CodeModel.GetById 36ms RepoModel.GetById 6ms app.codeStats 0ms

/Nette/Forms/IFormControl.php

https://github.com/DocX/nette
PHP | 77 lines | 11 code | 13 blank | 53 comment | 0 complexity | fc5f1da8631f0ae5fb6b01d413bb7ca6 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. <?php
  2. /**
  3. * Nette Framework
  4. *
  5. * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
  6. *
  7. * This source file is subject to the "Nette license" that is bundled
  8. * with this package in the file license.txt.
  9. *
  10. * For more information please see http://nettephp.com
  11. *
  12. * @copyright Copyright (c) 2004, 2009 David Grudl
  13. * @license http://nettephp.com/license Nette license
  14. * @link http://nettephp.com
  15. * @category Nette
  16. * @package Nette\Forms
  17. */
  18. /*namespace Nette\Forms;*/
  19. /**
  20. * Defines method that must be implemented to allow a component to act like a form control.
  21. *
  22. * @author David Grudl
  23. * @copyright Copyright (c) 2004, 2009 David Grudl
  24. * @package Nette\Forms
  25. */
  26. interface IFormControl
  27. {
  28. /**
  29. * Loads HTTP data.
  30. * @return void
  31. */
  32. function loadHttpData();
  33. /**
  34. * Sets control's value.
  35. * @param mixed
  36. * @return void
  37. */
  38. function setValue($value);
  39. /**
  40. * Returns control's value.
  41. * @return mixed
  42. */
  43. function getValue();
  44. /**
  45. * @return Rules
  46. */
  47. function getRules();
  48. /**
  49. * Returns errors corresponding to control.
  50. * @return array
  51. */
  52. function getErrors();
  53. /**
  54. * Is control disabled?
  55. * @return bool
  56. */
  57. function isDisabled();
  58. /**
  59. * Returns translated string.
  60. * @param string
  61. * @return string
  62. */
  63. function translate($s);
  64. }