1: <?php
2:
3: namespace Charcoal\Source;
4:
5: interface FilterInterface
6: {
7: /**
8: * @param array $data The filter data.
9: * @return Filter Chainable
10: */
11: public function setData(array $data);
12:
13: /**
14: * @param boolean $active The active flag.
15: * @return FilterInterface Chainable
16: */
17: public function setActive($active);
18:
19: /**
20: * @return boolean
21: */
22: public function active();
23:
24: /**
25: * @param string $property The filter's property.
26: * @throws InvalidArgumentException If the property argument is not a string.
27: * @return FilterInterface Chainable
28: */
29: public function setProperty($property);
30:
31: /**
32: * @return string
33: */
34: public function property();
35: /**
36: * @param mixed $val The filter value.
37: * @return FilterInterface Chainable
38: */
39: public function setVal($val);
40:
41: /**
42: * @return mixed
43: */
44: public function val();
45:
46: /**
47: * @param string $operator The filter operator.
48: * @return FilterInterface Chainable
49: */
50: public function setOperator($operator);
51:
52: /**
53: * @return string
54: */
55: public function operator();
56:
57: /**
58: * @param string $func The filter function.
59: * @return FilterInterface Chainable
60: */
61: public function setFunc($func);
62:
63: /**
64: * @return string
65: */
66: public function func();
67:
68: /**
69: * @param string $operand The filter operand.
70: * @return FilterInterface Chainable
71: */
72: public function setOperand($operand);
73: /**
74: * @return string
75: */
76: public function operand();
77:
78: /**
79: * @param string $tableName The table name (default to objTable).
80: * @return FilterInterface Chainable
81: */
82: public function setTableName($tableName);
83: /**
84: * @return string
85: */
86: public function tableName();
87:
88: /**
89: * @param string $sql The filter SQL string.
90: * @return FilterInterface Chainable
91: */
92: public function setString($sql);
93:
94: /**
95: * @return string
96: */
97: public function string();
98: }
99: