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