-
Notifications
You must be signed in to change notification settings - Fork 1
Query
Bright Antwi Boasiako edited this page Aug 19, 2020
·
2 revisions
-
Constants
- Archived Status:
-
ARCHIVED_EXCLUDED
: retrieve resources without archived. Default -
ARCHIVED_ONLY
: retrieve only archived resources. -
ARCHIVED_INCLUDED
: retrieve both archived and unarchived resources.
-
- Table Specifications Status:
-
TS_EXCLUDED
: without table specifications. Default -
TS_ONLY
: only table specifications without data. -
TS_INCLUDED
: both table specifications and data.
-
- Total(count) Status
-
TOTAL_EXCLUDED
: without total resources. Default -
TOTAL_ONLY
: only meta-data(pagination info) without data. -
TOTAL_INCLUDED
: include total(count) resources to pagination info.
-
- Archived Status:
-
Functions
-
setConjunction( string $conjunction )
: set filter conjunction (and
|or
) -
setQuery( string $query )
: general search. -
addFilter( string $key, string $operator, $value = null )
: add filter on key -
addSort( string $key, bool $ascending = true )
: add sort by key -
setLimit( int $limit )
: set per-page -
setPage( int $page )
: set page -
setExcluded( array $exclude )
: set excluded fields to prevent return in response -
setIncluded( array $include )
: set included fields to return it only. -
setArchivedStatus( int $archived )
: set archived status -
setTableSpecificationsStatus( int $tableSpecifications )
: set dataTable specification status -
setTotalStatus( int $total )
: set total(count) status -
setVisibleOnly( int $visible_only )
: set visible_only flag
-
-
Example
$request = new Request(); $request->setConjunction('and'); $request->addFilter('sku', 'contains', 'abc'); $request->setExcluded(['price', 'vendor_pricing']); $request->setArchivedStatus(Request::ARCHIVED_INCLUDED);