getwarp/criteria

Define rules to filter datasets in declarative way

Fund package maintenance!
getwarp
hustlahusky

3.1.0 2022-08-22 13:41 UTC

This package is auto-updated.

Last update: 2024-10-22 18:25:47 UTC


README

getwarp/criteria

Define rules to filter datasets in declarative way

GitHubPackagistInstallationUsage

Installation

Via Composer

$ composer require getwarp/criteria

Usage

use Warp\Criteria\Criteria;
use Warp\Criteria\Expression\ExpressionFactory;

$criteria = Criteria::new();
$ef = ExpressionFactory::new();

$criteria->where($ef->property('name', $ef->equals('Ben')))
    ->orderBy(['lastName' => SORT_ASC])
    ->offset(50)
    ->limit(25);

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Report issues and send pull requests in the main Warp repository. Please see contributing guide and code of conduct for details.

Credits

License

The MIT License (MIT). Please see license file for more information.