Expression
2 years ago
ForUpdate
2 years ago
ForUpdate.php
2 years ago
Limit.php
2 years ago
QueryBuilder.php
2 years ago
QueryException.php
2 years ago
SelectQuery.php
2 years ago
index.php
2 years ago
Limit.php
26 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Doctrine\DBAL\Query; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | final class Limit |
| 5 | { |
| 6 | private ?int $maxResults; |
| 7 | private int $firstResult; |
| 8 | public function __construct(?int $maxResults, int $firstResult) |
| 9 | { |
| 10 | $this->maxResults = $maxResults; |
| 11 | $this->firstResult = $firstResult; |
| 12 | } |
| 13 | public function isDefined() : bool |
| 14 | { |
| 15 | return $this->maxResults !== null || $this->firstResult !== 0; |
| 16 | } |
| 17 | public function getMaxResults() : ?int |
| 18 | { |
| 19 | return $this->maxResults; |
| 20 | } |
| 21 | public function getFirstResult() : int |
| 22 | { |
| 23 | return $this->firstResult; |
| 24 | } |
| 25 | } |
| 26 |