pagerwave / symfony-http-foundation-integration
PagerWave integration with Symfony's HttpFoundation
v1.4.0
2024-11-22 16:58 UTC
Requires
- php: 7.2.*|7.3.*|7.4.*|8.0.*|8.1.*|8.2.*|8.3.*|8.4.*
- postmill/pagerwave: ^2.0
- symfony/http-foundation: ^3.4|^4.4|^5.0|^6.0|^7.0
Requires (Dev)
- phpunit/phpunit: ^8.5
README
This package provides integration for PagerWave with Symfony's HttpFoundation component.
Installation
$ composer require pagerwave/symfony-http-foundation-integration
Usage
This library provides query readers and URL generators that operate on Request
and RequestStack
objects from Symfony's HttpFoundation:
// Using a RequestStack
use PagerWave\Integration\Symfony\RequestStackQueryReader;
use PagerWave\Integration\Symfony\RequestStackUrlGenerator;
assert($requestStack instanceof \Symfony\Component\HttpFoundation\RequestStack);
$queryReader = new RequestStackQueryReader($requestStack);
$urlGenerator = new RequestStackUrlGenerator($requestStack);
// Using a Request
use PagerWave\Integration\Symfony\RequestQueryReader;
use PagerWave\Integration\Symfony\RequestUrlGenerator;
assert($request instanceof \Symfony\Component\HttpFoundation\Request);
$queryReader = new RequestQueryReader($request);
$urlGenerator = new RequestUrlGenerator($request);
This should also play nicely with any Symfony-derived frameworks that use either of these HTTP abstractions, such as Laravel.
Read the PagerWave documentation to learn more.
Licence
This project is released under the Zlib licence.