function PHPExcel_Writer_Excel5_Parser::_condition in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Parser.php \PHPExcel_Writer_Excel5_Parser::_condition()
* It parses a condition. It assumes the following rule: * Cond -> Expr [(">" | "<") Expr] * * @access private *
Return value
mixed The parsed ptg'd tree on success
2 calls to PHPExcel_Writer_Excel5_Parser::_condition()
- PHPExcel_Writer_Excel5_Parser::parse in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel5/ Parser.php - * The parsing method. It parses a formula. * * @access public *
- PHPExcel_Writer_Excel5_Parser::_func in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel5/ Parser.php - * It parses a function call. It assumes the following rule: * Func -> ( Expr [,Expr]* ) * * @access private *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel5/ Parser.php, line 1221
Class
- PHPExcel_Writer_Excel5_Parser
- PHPExcel_Writer_Excel5_Parser
Code
function _condition() {
$result = $this
->_expression();
if ($this->_current_token == "<") {
$this
->_advance();
$result2 = $this
->_expression();
$result = $this
->_createTree('ptgLT', $result, $result2);
}
elseif ($this->_current_token == ">") {
$this
->_advance();
$result2 = $this
->_expression();
$result = $this
->_createTree('ptgGT', $result, $result2);
}
elseif ($this->_current_token == "<=") {
$this
->_advance();
$result2 = $this
->_expression();
$result = $this
->_createTree('ptgLE', $result, $result2);
}
elseif ($this->_current_token == ">=") {
$this
->_advance();
$result2 = $this
->_expression();
$result = $this
->_createTree('ptgGE', $result, $result2);
}
elseif ($this->_current_token == "=") {
$this
->_advance();
$result2 = $this
->_expression();
$result = $this
->_createTree('ptgEQ', $result, $result2);
}
elseif ($this->_current_token == "<>") {
$this
->_advance();
$result2 = $this
->_expression();
$result = $this
->_createTree('ptgNE', $result, $result2);
}
elseif ($this->_current_token == "&") {
$this
->_advance();
$result2 = $this
->_expression();
$result = $this
->_createTree('ptgConcat', $result, $result2);
}
return $result;
}