devture / silex-provider-pjax
Silex provider for PJAX integration
Installs: 127
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 3
Forks: 0
Open Issues: 1
pkg:composer/devture/silex-provider-pjax
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-01-18 16:10:20 UTC
README
PJAX integration for Silex micro-framework projects.
Usage
Registration:
<?php $app->register(new \Devture\SilexProvider\PJAX\ServicesProvider());
- As a result, the following Twig functions/filters are provided:
is_pjax()
- tells you if the current request is a PJAX request|strip_pjax_param
filter - removes the cache-busting_pjax
query-string parameter from a URL
This provider also registers some "after-request" event handlers to handle some edge-cases,
regarding redirect responses. To learn more, read the comments in ServicesProvider.php
.
Note that you need to include the jquery.pjax.js
file on your pages by some other means.
It's not included here.