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