56 $this->_parser = $parser;
114 $parsedExpression = $this->_parser->parseExpression($expr);
116 $firstOperand = $secondOperand =
null;
117 foreach ($parsedExpression as $operand) {
118 if ($this->_parser->isOperation($operand)) {
121 $firstOperand = $secondOperand =
null;
123 if (
null === $firstOperand) {
125 }
elseif (
null === $secondOperand) {
144 if (
null === $firstOperand &&
null === $secondOperand) {
145 $firstOperand = $tmpResult;
147 }
elseif (
null !== $firstOperand &&
null === $secondOperand) {
149 }
elseif (
null !== $firstOperand &&
null !== $secondOperand) {
162 protected function _operate($firstOperand, $secondOperand, $operation)
165 switch ($operation) {
167 $result = $firstOperand + $secondOperand;
170 $result = $firstOperand - $secondOperand;
173 $result = $firstOperand * $secondOperand;
176 $result = $secondOperand ? $firstOperand / $secondOperand : $secondOperand;
191 if (!is_numeric($operand)) {
192 if (isset($this->_totals[$operand])) {
193 $operand = $this->_totals[$operand];
212 $this->_columns[
$index] = $totalExpr;
234 foreach ($this->_columns as
$index => $expr) {
248 return $this->_factory->create($this->_totals);
257 public function reset($isFullReset =
false)
260 $this->_columns = [];
elseif(isset( $params[ 'redirect_parent']))