| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Ray\AuraSqlModule\Pagerfanta; |
||
| 6 | |||
| 7 | use Aura\Sql\ExtendedPdoInterface; |
||
| 8 | use Override; |
||
| 9 | |||
| 10 | final readonly class AuraSqlPagerFactory implements AuraSqlPagerFactoryInterface |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 11 | { |
||
| 12 | public function __construct(private AuraSqlPagerInterface $auraSqlPager) |
||
| 13 | { |
||
| 14 | } |
||
| 15 | |||
| 16 | /** |
||
| 17 | * {@inheritDoc} |
||
| 18 | */ |
||
| 19 | #[Override] |
||
| 20 | public function newInstance(ExtendedPdoInterface $pdo, string $sql, array $params, int $paging, string $uriTemplate, ?string $entity = null): AuraSqlPagerInterface |
||
| 21 | { |
||
| 22 | $this->auraSqlPager->init($pdo, $sql, $params, $paging, new DefaultRouteGenerator($uriTemplate), $entity); |
||
| 23 | |||
| 24 | return $this->auraSqlPager; |
||
| 25 | } |
||
| 26 | } |
||
| 27 |