Download the PHP package nebkam/odm-search-param without Composer
On this page you can find all versions of the php package nebkam/odm-search-param. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package odm-search-param
ODM Search Param
Rationale
- you use Doctrine MongoDB ODM
- you need some search functionality, that can be expressed through the
QueryBuilder
or theMatchPhase
of the Aggregation Builder - you have a class that holds the search parameters (i.e. a domain class in Symfony)
- you don't want to manually map the search parameters to builder statements
Usage
- Search filter class can be any class with public properties
- Properties should be marked with
#[SearchParam]
attribute - Use the
SearchParamParser::parse
with aQueryBuilder|MatchStage
instance to build the query on
Examples
Verbatim (String
and Bool
types)
Builds the query to:
Using different property names
Builds the query to:
Type casting (Int
type)
Builds the query to:
Type casting with arrays (IntArray
and StringArray
types)
Builds the query to:
Using backing values from enums (StringEnum
and IntEnum
types)
Builds the query to:
Using backing values from enum arrays (StringEnumArray
and IntEnumArray
types)
Builds the query to:
Querying by range (RangeInt
, RangeInt
and RangeFloat
types)
Builds the query to:
Custom query building by specifying the callable
All versions of odm-search-param with dependencies
PHP Build Version
Package Version
The package nebkam/odm-search-param contains the following files
Loading the files please wait ....