1 | <?php |
||
8 | class ValueResult { |
||
9 | private $result = []; |
||
10 | /* |
||
11 | The next operation to perform. Will be one of the following: |
||
12 | ARG - A new value e.g, "a","b" becomes ["a", "b"] |
||
13 | CONCAT - Concat onto the current arg e.g "a" + "b" becomes ["ab"] |
||
14 | NOT - Boolean operation "a" != "b" becomes [true] |
||
15 | EQUALS - Boolean operation "a" = "b" becomes [false] |
||
16 | */ |
||
17 | private $mode = Tokenizer::ARG; |
||
18 | |||
19 | //Processes $newValue using $mode. Either concats to the current argument, adds a new argument |
||
20 | //Or usess the two arguments for a boolean comparison |
||
21 | public function processValue($newValue) { |
||
41 | |||
42 | public function in($value) { |
||
46 | |||
47 | public function arg($value) { |
||
50 | |||
51 | public function concat($value) { |
||
54 | |||
55 | public function not($value) { |
||
58 | |||
59 | public function equals($value) { |
||
62 | |||
63 | public function greater($value) { |
||
66 | |||
67 | public function lower($value) { |
||
70 | |||
71 | public function add($value) { |
||
74 | |||
75 | public function sub($value) { |
||
78 | |||
79 | public function mult($value) { |
||
82 | |||
83 | public function div($value) { |
||
86 | |||
87 | public function setMode($mode) { |
||
90 | |||
91 | public function getMode() { |
||
94 | |||
95 | public function getResult() { |
||
98 | |||
99 | public function pop() { |
||
102 | |||
103 | private function write($index, $value, $allowNull = false) { |
||
108 | |||
109 | //Postprocessing - replace values with null where allowed, or override a value at position |
||
110 | public function postProcess(ValueData $data, $val, $overrideVal, $allowNull) { |
||
119 | |||
120 | public function clear() { |
||
123 | } |
||
124 |