vaened / php-criteria-language
v0.1
2023-05-12 21:35 UTC
Requires
- php: ^8.1
- lambdish/phunctional: ^2.1
- vaened/php-criteria-core: ^0.4.0
- vaened/support: ^0.2.0
Requires (Dev)
- phpunit/phpunit: ^10.1
- symfony/var-dumper: ^6.2
This package is auto-updated.
Last update: 2024-11-17 04:41:58 UTC
README
Build criteria based on a string of characters
composer require vaened/php-criteria-language
this
[author]=enea% &
[created]={2020, 202306} &
[languages]=[PHP, JAVA]&
[visibility]=![private, archived] &
becomes
Statements::of([ Statement::that('author', FilterOperator::StartsWith, 'enea'), Statement::that('created', FilterOperator::Between, [ new DateTimeImmutable('2020-01-01'), new DateTimeImmutable('2023-06-30T23:59:59.999999') ]), Statement::that('languages', FilterOperator::In, ['PHP', 'JAVA']), Statement::that('visibility', FilterOperator::NotIn, ['private', 'archived']), ]);