Download the PHP package componenta/http-paginate-interceptor without Composer
On this page you can find all versions of the php package componenta/http-paginate-interceptor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download componenta/http-paginate-interceptor
More information about componenta/http-paginate-interceptor
Files in componenta/http-paginate-interceptor
Package http-paginate-interceptor
Short Description HTTP pagination result interceptor for Componenta
License MIT
Informations about the package http-paginate-interceptor
Componenta HTTP Paginate Interceptor
HTTP interceptor for componenta/interceptor that turns PaginatorInterface into Componenta\Http\ResourcePaginator with prev / next links.
Русская документация
Boundary
This package contains one attribute: #[Paginate]. The attribute itself implements InterceptorInterface, so it does not need a separate #[Intercept(...)].
It does not fetch data and does not create paginators. The route handler must return Componenta\Stdlib\PaginatorInterface.
Installation
Quick Start
If the result does not implement PaginatorInterface, #[Paginate] returns it unchanged.
Response Fields
By default ResourcePaginator receives:
You can keep only selected metadata fields. results is always added automatically:
HTTP Request In Context
prev and next generation requires the current ServerRequestInterface. componenta/router-app passes the HTTP request into callable context when executing route handlers. If #[Paginate] receives a paginator without that request attribute, it throws LogicException.
Scope
#[Paginate] is restricted to Scope::HTTP.
License
MIT
All versions of http-paginate-interceptor with dependencies
componenta/http-pagination Version ^1.0
componenta/interceptor Version ^1.0
componenta/paginator Version ^1.0
componenta/scope Version ^1.0
psr/http-message Version ^2.0