diff options
Diffstat (limited to 'vendor/doctrine/dbal/src/Query/Limit.php')
-rw-r--r-- | vendor/doctrine/dbal/src/Query/Limit.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/vendor/doctrine/dbal/src/Query/Limit.php b/vendor/doctrine/dbal/src/Query/Limit.php new file mode 100644 index 0000000..32178e8 --- /dev/null +++ b/vendor/doctrine/dbal/src/Query/Limit.php | |||
@@ -0,0 +1,29 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\DBAL\Query; | ||
6 | |||
7 | final class Limit | ||
8 | { | ||
9 | public function __construct( | ||
10 | private readonly ?int $maxResults, | ||
11 | private readonly int $firstResult, | ||
12 | ) { | ||
13 | } | ||
14 | |||
15 | public function isDefined(): bool | ||
16 | { | ||
17 | return $this->maxResults !== null || $this->firstResult !== 0; | ||
18 | } | ||
19 | |||
20 | public function getMaxResults(): ?int | ||
21 | { | ||
22 | return $this->maxResults; | ||
23 | } | ||
24 | |||
25 | public function getFirstResult(): int | ||
26 | { | ||
27 | return $this->firstResult; | ||
28 | } | ||
29 | } | ||