vaened / php-criteria-language
Installs: 11 624
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.2
- lambdish/phunctional: ^2.1
- vaened/php-criteria-core: ^1.0
- vaened/support: ^4.1
Requires (Dev)
- phpunit/phpunit: ^10.1
- symfony/var-dumper: ^6.2
This package is auto-updated.
Last update: 2025-01-14 15:57:31 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']), ]);