Source for file IFormControl.php

Documentation is available at IFormControl.php

  1. 1: <?php
  2. 2:  
  3. 3: /**
  4. 4:  * Nette Framework
  5. 5:  *
  6. 6:  * @copyright  Copyright (c) 2004, 2010 David Grudl
  7. 7:  * @license    http://nettephp.com/license  Nette license
  8. 8:  * @link       http://nettephp.com
  9. 9:  * @category   Nette
  10. 10:  * @package    Nette\Forms
  11. 11:  */
  12. 12:  
  13. 13:  
  14. 14:  
  15. 15: /**
  16. 16:  * Defines method that must be implemented to allow a component to act like a form control.
  17. 17:  *
  18. 18:  * @copyright  Copyright (c) 2004, 2010 David Grudl
  19. 19:  * @package    Nette\Forms
  20. 20:  */
  21. 21: interface IFormControl
  22. 22: {
  23. 23:  
  24. 24:     /**
  25. 25:      * Loads HTTP data.
  26. 26:      * @return void 
  27. 27:      */
  28. 28:     function loadHttpData();
  29. 29:  
  30. 30:     /**
  31. 31:      * Sets control's value.
  32. 32:      * @param  mixed 
  33. 33:      * @return void 
  34. 34:      */
  35. 35:     function setValue($value);
  36. 36:  
  37. 37:     /**
  38. 38:      * Returns control's value.
  39. 39:      * @return mixed 
  40. 40:      */
  41. 41:     function getValue();
  42. 42:  
  43. 43:     /**
  44. 44:      * @return Rules 
  45. 45:      */
  46. 46:     function getRules();
  47. 47:  
  48. 48:     /**
  49. 49:      * Returns errors corresponding to control.
  50. 50:      * @return array 
  51. 51:      */
  52. 52:     function getErrors();
  53. 53:  
  54. 54:     /**
  55. 55:      * Is control disabled?
  56. 56:      * @return bool 
  57. 57:      */
  58. 58:     function isDisabled();
  59. 59:  
  60. 60:     /**
  61. 61:      * Returns translated string.
  62. 62:      * @param  string 
  63. 63:      * @param  int      plural count
  64. 64:      * @return string 
  65. 65:      */
  66. 66:     function translate($s$count NULL);
  67. 67:  
  68. 68: }