Andx.php
9 months ago
Base.php
9 months ago
Comparison.php
9 months ago
Composite.php
9 months ago
From.php
9 months ago
Func.php
9 months ago
GroupBy.php
9 months ago
Join.php
9 months ago
Literal.php
9 months ago
Math.php
9 months ago
OrderBy.php
9 months ago
Orx.php
9 months ago
Select.php
9 months ago
index.php
9 months ago
Comparison.php
39 lines
| 1 | <?php |
| 2 | declare (strict_types=1); |
| 3 | namespace MailPoetVendor\Doctrine\ORM\Query\Expr; |
| 4 | if (!defined('ABSPATH')) exit; |
| 5 | class Comparison |
| 6 | { |
| 7 | public const EQ = '='; |
| 8 | public const NEQ = '<>'; |
| 9 | public const LT = '<'; |
| 10 | public const LTE = '<='; |
| 11 | public const GT = '>'; |
| 12 | public const GTE = '>='; |
| 13 | protected $leftExpr; |
| 14 | protected $operator; |
| 15 | protected $rightExpr; |
| 16 | public function __construct($leftExpr, $operator, $rightExpr) |
| 17 | { |
| 18 | $this->leftExpr = $leftExpr; |
| 19 | $this->operator = $operator; |
| 20 | $this->rightExpr = $rightExpr; |
| 21 | } |
| 22 | public function getLeftExpr() |
| 23 | { |
| 24 | return $this->leftExpr; |
| 25 | } |
| 26 | public function getOperator() |
| 27 | { |
| 28 | return $this->operator; |
| 29 | } |
| 30 | public function getRightExpr() |
| 31 | { |
| 32 | return $this->rightExpr; |
| 33 | } |
| 34 | public function __toString() |
| 35 | { |
| 36 | return $this->leftExpr . ' ' . $this->operator . ' ' . $this->rightExpr; |
| 37 | } |
| 38 | } |
| 39 |