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
From.php
33 lines
| 1 | <?php |
| 2 | declare (strict_types=1); |
| 3 | namespace MailPoetVendor\Doctrine\ORM\Query\Expr; |
| 4 | if (!defined('ABSPATH')) exit; |
| 5 | class From |
| 6 | { |
| 7 | protected $from; |
| 8 | protected $alias; |
| 9 | protected $indexBy; |
| 10 | public function __construct($from, $alias, $indexBy = null) |
| 11 | { |
| 12 | $this->from = $from; |
| 13 | $this->alias = $alias; |
| 14 | $this->indexBy = $indexBy; |
| 15 | } |
| 16 | public function getFrom() |
| 17 | { |
| 18 | return $this->from; |
| 19 | } |
| 20 | public function getAlias() |
| 21 | { |
| 22 | return $this->alias; |
| 23 | } |
| 24 | public function getIndexBy() |
| 25 | { |
| 26 | return $this->indexBy; |
| 27 | } |
| 28 | public function __toString() |
| 29 | { |
| 30 | return $this->from . ' ' . $this->alias . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : ''); |
| 31 | } |
| 32 | } |
| 33 |