$webapi
$webapi : \Visionline\Crm\WebApi\WebApi
The WebApi to use for this query
Defines a query which can be run against a CRM-VISIONLINE WebApi Webservice.
$webapi : \Visionline\Crm\WebApi\WebApi
The WebApi to use for this query
__construct(\Visionline\Crm\WebApi\WebApi $webapi, string $type)
Creates a new query
\Visionline\Crm\WebApi\WebApi | $webapi | The instance of the WebApi PHP Client to use |
string | $type | The entity type of this query |
add(\Visionline\Crm\WebApi\Filter $filter) : \Visionline\Crm\WebApi\Query
Adds a filter to the query
\Visionline\Crm\WebApi\Filter | $filter | The filter to add. |
A reference to this query.
order(\Visionline\Crm\WebApi\Order $order) : \Visionline\Crm\WebApi\Query
Adds an order to the query
\Visionline\Crm\WebApi\Order | $order | The order to add to this query |
A reference to this query.
addOrder(\Visionline\Crm\WebApi\Order $order) : \Visionline\Crm\WebApi\Query
Adds an order to the query
\Visionline\Crm\WebApi\Order | $order | The order to add to this query |
A reference to this query.
first(integer $first) : \Visionline\Crm\WebApi\Query
Specifies the index of first result to be retrieved by this query
integer | $first | The index of first result to be retrieved by this query |
A reference to this query.
max(integer $max) : \Visionline\Crm\WebApi\Query
Specifies the amount of elements returned by this query
integer | $max | The amount of elements returned by this query |
A reference to this query.
uniqueResult() : \Visionline\Crm\WebApi\QueryResult
Runs this query and returns its result. If this query produces multiple results, only the first result is returned.
if a remote error occurs.
fields(array $fields, array $idFields = array()) : array
Runs this query by calling result() and returns the specified fields of the matching entities by calling WebApi::get for the query results.
array | $fields | An array of strings specifying which fields should be returned. The strings in the array have to be UTF-8 encoded. |
array | $idFields | An array string string specifying fields that should be returned with their id value instead of their name. The strings in the array have to be UTF-8 encoded. |
if a remote error occurs.
A two-dimensional array that contains the results. The keys of the first level are the ids of the entities. The keys of the second level are the field identifiers and values are the corresponding field values. The field values are UTF-8 encoded strings.