A PHP pagination library with adapters for various data sources and customizable view templates.
Pagerfanta is a flexible pagination library for PHP applications that provides a clean abstraction for paginating different types of data sources. It separates the pagination logic from data retrieval and presentation, making it adaptable to various frameworks and use cases by using an adapter architecture.
PHP developers building applications that require pagination of data from diverse sources like databases (Doctrine, Propel), search engines (Elastica, Solarium), or arrays. It is particularly useful for those working with Symfony or other frameworks needing reusable pagination components.
Developers choose Pagerfanta for its extensive adapter support, which allows pagination of almost any data type, and its separation of concerns that enables consistent, reusable pagination logic independent of data source or presentation layer.
Pagination for PHP.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports pagination for diverse data sources like Doctrine, MongoDB, Elastica, and Solarium through dedicated adapters, making it highly versatile for complex applications.
Includes built-in views for Twitter Bootstrap (v2-4) and Semantic UI, along with a default view, allowing easy integration with popular CSS frameworks without extra coding.
Offers a fluent interface for methods like setMaxPerPage() and setCurrentPage(), enhancing code readability and simplifying pagination setup.
Throws specific exceptions for invalid parameters (e.g., non-integer pages), helping developers catch and handle errors early in the pagination logic.
The project is explicitly marked as no longer maintained, with users directed to a fork, meaning no updates, bug fixes, or community support for the original version.
The adapter architecture can be overkill for simple pagination tasks, adding unnecessary overhead compared to lighter libraries that handle arrays or basic queries directly.
Some adapters, like ElasticaAdapter, have inherent limitations such as max result thresholds (e.g., offset + limit not exceeding 10000), requiring extra configuration for large datasets.