pagerwave/symfony-http-foundation-integration

PagerWave integration with Symfony's HttpFoundation

v1.4.0 2024-11-22 16:58 UTC

This package is auto-updated.

Last update: 2024-11-22 16:59:33 UTC


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.