. */ namespace Doctrine\ORM\Query\Expr; /** * Expression class for DQL comparison expressions * * @author Jonathan H. Wage * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://www.phpdoctrine.org * @since 2.0 * @version $Revision$ */ class Comparison { const EQ = '='; const NEQ = '<>'; const LT = '<'; const LTE = '<='; const GT = '>'; const GTE = '>='; private $_leftExpr; private $_operator; private $_rightExpr; public function __construct($leftExpr, $operator, $rightExpr) { $this->_leftExpr = $leftExpr; $this->_operator = $operator; $this->_rightExpr = $rightExpr; } public function __toString() { return $this->_leftExpr . ' ' . $this->_operator . ' ' . $this->_rightExpr; } }