Download the PHP package hibit-dev/criteria without Composer
On this page you can find all versions of the php package hibit-dev/criteria. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package criteria
Criteria: PHP package for managing Criteria Pattern
Criteria is a framework-agnostic PHP package that allows managing criteria pattern, streamlining data filtering, sorting, and pagination with ease. By Integrating Criteria into your PHP applications developers will easily adapt to evolving filtering requirements without the need for extensive code modifications.
Installation
Install Criteria using composer require
:
Usage
A specific criteria must be created for each use case. It will extend the shared domain logic contained in the abstract criteria implementation. As an illustrative example, we generated UserCriteria that will help us to filter based on name, email, both, or neither of them. Additionally, paginating and sorting the results.
Assuming the user repository already exists, the criteria usage will look like as following
At the end, the criteria object is passed to the repository and applied when building the query to retrieve data. Following methods will be accessible within the repository's search function, ensuring the accurate filtering of results.
Note that all values can be nullable when constructing the query within the repository.
Documentation
Discover a world of knowledge hosted on HiBit website. Serving as your informational hub, this resource offers clear instructions and valuable insights to explore a spectrum of articles, tutorials, stories, news, and beyond.
You'll find detailed instructions and comprehensive documentation about this repository on:
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
About HiBit
HiBit isn't just a blog; it's your go-to space for everything related to development, IT, and the wonders of electronics. Designed for developers, IT enthusiasts, and electronics hobby lovers, HiBit is a dynamic hub that keeps you in the loop with fresh and engaging content.
Explore a collection of articles, tutorials, and insights, encouraging a lively community where reading, commenting, discussing, and sharing experiences is not just promoted but celebrated.
License
The MIT License (MIT). Please see License File for more information.