2009-01-19 21:40:12 +03:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* To change this template, choose Tools | Templates
|
|
|
|
* and open the template in the editor.
|
|
|
|
*/
|
|
|
|
|
2009-01-22 22:38:10 +03:00
|
|
|
namespace Doctrine\ORM\Query\AST;
|
|
|
|
|
2009-01-19 21:40:12 +03:00
|
|
|
/**
|
2009-01-20 20:07:07 +03:00
|
|
|
* ComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression ) |
|
|
|
|
* StringExpression ComparisonOperator (StringExpression | QuantifiedExpression) |
|
|
|
|
* BooleanExpression ("=" | "<>" | "!=") (BooleanExpression | QuantifiedExpression) |
|
|
|
|
* EnumExpression ("=" | "<>" | "!=") (EnumExpression | QuantifiedExpression) |
|
|
|
|
* DatetimeExpression ComparisonOperator (DatetimeExpression | QuantifiedExpression) |
|
|
|
|
* EntityExpression ("=" | "<>") (EntityExpression | QuantifiedExpression)
|
2009-01-19 21:40:12 +03:00
|
|
|
*
|
|
|
|
* @author robo
|
|
|
|
*/
|
2009-01-22 22:38:10 +03:00
|
|
|
class ComparisonExpression extends Node
|
2009-01-19 21:40:12 +03:00
|
|
|
{
|
2009-01-20 20:07:07 +03:00
|
|
|
private $_leftExpr;
|
|
|
|
private $_rightExpr;
|
|
|
|
private $_operator;
|
|
|
|
|
|
|
|
public function __construct($leftExpr, $operator, $rightExpr)
|
|
|
|
{
|
|
|
|
$this->_leftExpr = $leftExpr;
|
|
|
|
$this->_rightExpr = $rightExpr;
|
|
|
|
$this->_operator = $operator;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getLeftExpression()
|
|
|
|
{
|
|
|
|
return $this->_leftExpr;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getRightExpression()
|
|
|
|
{
|
|
|
|
return $this->_rightExpr;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getOperator()
|
|
|
|
{
|
|
|
|
return $this->_operator;
|
|
|
|
}
|
2009-01-19 21:40:12 +03:00
|
|
|
}
|
|
|
|
|