A query represents a set of query parameters for a GET request
You should use it to pass query and filter parameters to the Client's get* methods.
For example:
$myQuery = new Query();
$myQuery->set('foo', 'bar');
$myQuery->setPageSize(10);
$myQuery->addFilter(new Filter('field', 'value'));
package |
NextEvent\PHPSDK\Util |
---|
__construct( $partsOrQuery = null)
addFilter(\NextEvent\PHPSDK\Util\Filter $filter) : \NextEvent\PHPSDK\Util\Query
Example:
$query = new Query();
$query->addFilter(new Filter('created', '2018-10-23', '>=')));
Throws |
|
---|
\NextEvent\PHPSDK\Util\Filter
\NextEvent\PHPSDK\Util\Query
clear() : \NextEvent\PHPSDK\Util\Query
get( $name)
getFilter(string $name) : \NextEvent\PHPSDK\Util\Filter
string
The name of the filter.
\NextEvent\PHPSDK\Util\Filter
The found filter or null
if not found.
getPage() : integer
integer
The page.
getPageSize() : integer
integer
The page size.
remove(integer $name) : \NextEvent\PHPSDK\Util\Query
removeFilter( $nameOrFilter) : \NextEvent\PHPSDK\Util\Query
set(string $name, integer|string|array|boolean $value) : \NextEvent\PHPSDK\Util\Query
string
The name of the parameter.
integer|string|array|boolean
The value of the parameter.
\NextEvent\PHPSDK\Util\Query
setPage(integer $value) : \NextEvent\PHPSDK\Util\Query
Helper function which can be used to set a specific page when fetching a collection of models.
Throws |
|
---|
integer
The page.
\NextEvent\PHPSDK\Util\Query
setPageSize(integer $value) : \NextEvent\PHPSDK\Util\Query
Helper function which can be used to set a page size when fetching a collection of models.
Throws |
|
---|
integer
The page size.
\NextEvent\PHPSDK\Util\Query
toArray() : array
array
The parts of this query.
toString(array|\NextEvent\PHPSDK\Util\Query $arrayOrQuery = null) : string
For example
array('myId' => array(1,2), 'myHash' => 'abc')
becomes
myId=1,2&myHash=abc
.
array|\NextEvent\PHPSDK\Util\Query
A query instance or a list of query parameters. Array values will be converted into a ',' separated string.
string
An url encoded string.