\Visionline\Crm\WebApiQuery

Defines a query which can be run against a CRM-VISIONLINE WebApi Webservice.

Summary

Methods
Properties
Constants
__construct()
add()
order()
addOrder()
first()
max()
result()
uniqueResult()
fields()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$webapi
$type
$first
$max
$filters
$orders
N/A

Properties

$type

$type : string

The entity type of this query

Type

string

$first

$first : integer

The index of first result to be retrieved by this query

Type

integer

$max

$max : integer

The amount of elements returned by this query

Type

integer

$filters

$filters : array

The set of filters used in this query

Type

array — of Filter

$orders

$orders : array

The set of orders used in this query

Type

array — of Order

Methods

__construct()

__construct(\Visionline\Crm\WebApi\WebApi  $webapi, string  $type) 

Creates a new query

Parameters

\Visionline\Crm\WebApi\WebApi $webapi

The instance of the WebApi PHP Client to use

string $type

The entity type of this query

Warning: count(): Parameter must be an array or an object that implements Countable in phar://E:/source/CRM-VISIONLINE/3.4.2/Source/Website/build/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1376 Warning: count(): Parameter must be an array or an object that implements Countable in phar://E:/source/CRM-VISIONLINE/3.4.2/Source/Website/build/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1376

add()

add(\Visionline\Crm\WebApi\Filter  $filter) : \Visionline\Crm\WebApi\Query

Adds a filter to the query

Parameters

\Visionline\Crm\WebApi\Filter $filter

The filter to add.

Warning: count(): Parameter must be an array or an object that implements Countable in phar://E:/source/CRM-VISIONLINE/3.4.2/Source/Website/build/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1376 Warning: count(): Parameter must be an array or an object that implements Countable in phar://E:/source/CRM-VISIONLINE/3.4.2/Source/Website/build/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1376

Returns

\Visionline\Crm\WebApi\Query

A reference to this query.

order()

order(\Visionline\Crm\WebApi\Order  $order) : \Visionline\Crm\WebApi\Query

Adds an order to the query

Parameters

\Visionline\Crm\WebApi\Order $order

The order to add to this query

Warning: count(): Parameter must be an array or an object that implements Countable in phar://E:/source/CRM-VISIONLINE/3.4.2/Source/Website/build/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1376 Warning: count(): Parameter must be an array or an object that implements Countable in phar://E:/source/CRM-VISIONLINE/3.4.2/Source/Website/build/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1376

Returns

\Visionline\Crm\WebApi\Query

A reference to this query.

addOrder()

addOrder(\Visionline\Crm\WebApi\Order  $order) : \Visionline\Crm\WebApi\Query

Adds an order to the query

Parameters

\Visionline\Crm\WebApi\Order $order

The order to add to this query

Warning: count(): Parameter must be an array or an object that implements Countable in phar://E:/source/CRM-VISIONLINE/3.4.2/Source/Website/build/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1376 Warning: count(): Parameter must be an array or an object that implements Countable in phar://E:/source/CRM-VISIONLINE/3.4.2/Source/Website/build/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1376

Returns

\Visionline\Crm\WebApi\Query

A reference to this query.

first()

first(integer  $first) : \Visionline\Crm\WebApi\Query

Specifies the index of first result to be retrieved by this query

Parameters

integer $first

The index of first result to be retrieved by this query

Warning: count(): Parameter must be an array or an object that implements Countable in phar://E:/source/CRM-VISIONLINE/3.4.2/Source/Website/build/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1376 Warning: count(): Parameter must be an array or an object that implements Countable in phar://E:/source/CRM-VISIONLINE/3.4.2/Source/Website/build/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1376

Returns

\Visionline\Crm\WebApi\Query

A reference to this query.

max()

max(integer  $max) : \Visionline\Crm\WebApi\Query

Specifies the amount of elements returned by this query

Parameters

integer $max

The amount of elements returned by this query

Warning: count(): Parameter must be an array or an object that implements Countable in phar://E:/source/CRM-VISIONLINE/3.4.2/Source/Website/build/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1376 Warning: count(): Parameter must be an array or an object that implements Countable in phar://E:/source/CRM-VISIONLINE/3.4.2/Source/Website/build/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1376

Returns

\Visionline\Crm\WebApi\Query

A reference to this query.

result()

result() : array

Runs this query and returns its results.

Throws

\SoapFault

if a remote error occurs.

Returns

array —

of QueryResult

uniqueResult()

uniqueResult() : \Visionline\Crm\WebApi\QueryResult

Runs this query and returns its result. If this query produces multiple results, only the first result is returned.

Throws

\SoapFault

if a remote error occurs.

Returns

\Visionline\Crm\WebApi\QueryResult

fields()

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.

Parameters

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.

Throws

\SoapFault

if a remote error occurs.

Returns

array —

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.