FieldKeyWebsiteDocumentsPrefix
FieldKeyWebsiteDocumentsPrefix
This is the core class for the CRM-VISIONLINE WebApi PHP Client
$connection : \Visionline\Crm\WebApi\Connection
The connection to the CRM-VISIONLINE system
$cache : \Visionline\Crm\WebApi\Cache
The cache
__construct(string $endpoint, \Visionline\Crm\WebApi\Connection $connection, array $options)
Creates a new CRM-VISIONLINE WebApi PHP Client
string | $endpoint | The endpoint (URL) of the CRM-VISIONLINE WebApi Webservice, e.g. https://app2.visionline.at/WebApi/WebApi.aspx?WSDL |
\Visionline\Crm\WebApi\Connection | $connection | The connection information to the CRM-VISIONLINE system |
array | $options | Set the specified options. |
If an unknown option was provided in $options
getDebugMessages() : array
Returns the debug messages that have been collected since the last call to this method.
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 1376The debug messages.
createQuery(string $type) : \Visionline\Crm\WebApi\Query
Creates a query
string | $type | The entity type |
The query
debug(mixed $message)
If debugging is enabled, collects a debug message
mixed | $message |
_Query(string $type, array $filters, array $orders, integer $first, integer $max) : array
Calls the webservice method Query with the specified arguments
string | $type | the entity type |
array | $filters | the filters to use for this query |
array | $orders | the orders to use for this query |
integer | $first | index of the beginning of the result set |
integer | $max | maximum length of the result set |
if a remote error occurs
an array of objects with the properties 'id' and 'lastModified'.
_QueryResponsibleContacts(string $type, array<mixed,integer> $ids) : \Visionline\Crm\WebApi\QueryResult
Calls the webservice method QueryResponsibleContacts with the specified arguments
string | $type | the entity type |
array<mixed,integer> | $ids | the entity id |
if a remote error occurs
an array of objects with the properties 'id' and 'lastModified'.
_QueryContactImages(array $ids) : array
Calls the webservice method QueryContactImages with the specified arguments
array | $ids | the contact ids |
if a remote error occurs
of RelatedQueryResult describing the images of the specified contacts
_QueryWebsiteDocuments(string $type, array $ids, integer $max = null, array $filterByExtension = null, array $filterByDokumentart = null) : array
Calls the webservice method QueryWebsiteDocuments with the specified arguments
string | $type | the entity type |
array | $ids | the entity ids |
integer | $max | specifies the maximum count of website documents returned per entity |
array | $filterByExtension | filters the returned documents by the specified file extensions (array of strings) |
array | $filterByDokumentart | filters the returned documents by the specified document types (array of strings) |
if a remote error occurs
The query results
_QueryKontakte(string $type, array $ids, integer $max = null, array $filterByRole = null) : array
Calls the webservice method QueryKontakte with the specified arguments
string | $type | the entity type (EntityType::Objekt or EntityType::Projekt) |
array | $ids | the entity ids |
integer | $max | specifies the maximum number of results |
array | $filterByRole | filters the returned results by the specified roles (array of strings) |
if a remote error occurs
The query results
_QueryObjekte(string $type, array $ids, integer $max = null, array $filterByRole = null) : array
Calls the webservice method QueryObjekte with the specified arguments
string | $type | the entity type (EntityType::Kontakt) |
array | $ids | the entity ids |
integer | $max | specifies the maximum number of results |
array | $filterByRole | filters the returned results by the specified roles (array of strings) |
if a remote error occurs
of \Visionline\Crm\WebApi\RelatedRoleQueryResult describing the real estates
_QueryProjekte(string $type, array $ids, integer $max = null, array $filterByRole = null) : array
Calls the webservice method QueryProjekte with the specified arguments
string | $type | the entity type (EntityType::Kontakt) |
array | $ids | the entity ids |
integer | $max | specifies the maximum number of results |
array | $filterByRole | filters the returned results by the specified roles (array of strings) |
if a remote error occurs
of \Visionline\Crm\WebApi\RelatedRoleQueryResult describing the projects
_GetInterests(array $kontaktIds, array $filterByStatus = null) : array<mixed,\Visionline\Crm\WebApi\Interest>
Calls the webservice method GetInterests with the specified arguments
array | $kontaktIds | The IDs of the contacts |
array | $filterByStatus | filter the returned results by the specified stati |
if a remote error occurs
describing the interests
_GetEnquiries(array $enquiryIds) : array<mixed,\Visionline\Crm\WebApi\StoredEnquiry>
Calls the webservice method GetInterests with the specified arguments
array | $enquiryIds | The IDs of the enquiries |
if a remote error occurs
describing the interests
_QueryEvents(\DateTime|null $fromTimestamp, integer|null $afterId, integer $max) : array<mixed,\Visionline\Crm\WebApi\EventQueryResult>
Calls the webservice method QueryEvents with the specified arguments
\DateTime|null | $fromTimestamp | If supplied, only events that happened at or after this timestamp are returned. |
integer|null | $afterId | If supplied, only events that happened after the event with this ID are returned. |
integer | $max | Specifies the maximum amount of events to return. |
if a remote error occurs
describing the events
_Get(string $type, array $ids, array $fields, boolean $return_ids = false) : array
Calls the webservice method Get with the specified arguments
string | $type | the entity type |
array | $ids | the ids of the requested entities (array of int) |
array | $fields | the requested fields (array of string) |
boolean | $return_ids | Whether to return ids instead of values for relations |
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.
_Create(string $type, array $fieldValues) : integer
Calls the webservice method Create with the specified arguments
string | $type | the entity type |
array | $fieldValues | the field values to assign to the created entity (associative array of string) |
if a remote error occurs
The id of the created entity
_Update(string $type, integer $id, array $fieldValues)
Calls the webservice method Update with the specified arguments
string | $type | the entity type |
integer | $id | the id of the entity to be updated |
array | $fieldValues | the field values to set (associative array of string) |
if a remote error occurs
_EnumFields(string $type, string $category = NULL) : array
Calls the webservice method EnumFields with the specified arguments
string | $type | the entity type |
string | $category | the field category (optional) |
if a remote error occurs
of EnumFieldsResult
_CreateEnquiry(\Visionline\Crm\WebApi\Enquiry $enquiry) : \Visionline\Crm\WebApi\CreateEnquiryResult
Calls the webservice method CreateEnquiry with the specified arguments
\Visionline\Crm\WebApi\Enquiry | $enquiry | the enquiry |
if a remote error occurs
enumFields(string $type, string $category = NULL) : array
Enumerates the fields in CRM-VISIONLINE system for the specified type and optionally in the specified category.
string | $type | The entity type for which the fields should be enumerated |
string | $category | The category of fields to which the result set should be limited. This string has to be UTF-8 encoded. |
if a remote error occurs
of EnumFieldsResult
createEnquiry(\Visionline\Crm\WebApi\Enquiry $enquiry) : \Visionline\Crm\WebApi\CreateEnquiryResult
Create an enquiry in the CRM-VISIONLINE system
\Visionline\Crm\WebApi\Enquiry | $enquiry | the enquiry |
if a remote error occurs
queryResponsibleContacts(string $type, integer|\Visionline\Crm\WebApi\QueryResult|array $which) : array
Queries the responsible contacts of the specified entities.
string | $type | The entity type |
integer|\Visionline\Crm\WebApi\QueryResult|array | $which | Specifies the entities for which the responsible contacts should be queried |
if $which is not of type int, QueryResult, array of int or array of QueryResult
if a remote error occurs
of \Visionline\Crm\WebApi\RelatedQueryResult describing the responsible contacts
queryWebsiteDocuments(string $type, integer|\Visionline\Crm\WebApi\QueryResult|array $which, integer $max = null, array $filterByExtension = null, array $filterByDokumentart = null) : array
Queries the website documents of entities. Currently only the entity types Objekt and Projekt are supported.
string | $type | The entity type (EntityType::Objekt or EntityType::Projekt) |
integer|\Visionline\Crm\WebApi\QueryResult|array | $which | Specifies the entities for which the website documents should be queried |
integer | $max | specifies the maximum count of website documents returned per entity |
array | $filterByExtension | filters the returned documents by the specified file extensions (array of strings) |
array | $filterByDokumentart | filters the returned documents by the specified document types (array of strings) |
if $which is not of type int, QueryResult, array of int or array of QueryResult
if a remote error occurs
of \Visionline\Crm\WebApi\RelatedQueryResult describing the website documents
queryKontakte(string $type, integer|\Visionline\Crm\WebApi\QueryResult|array $which, integer $max = null, array $filterByRole = null) : array
Queries the contacts of real estates or projects.
string | $type | The entity type (EntityType::Objekt or EntityType::Projekt) |
integer|\Visionline\Crm\WebApi\QueryResult|array | $which | Specifies the entities for which the contacts should be queried |
integer | $max | specifies the maximum number of results |
array | $filterByRole | Optionally filters the returned documents by the specified file extensions (array of strings) |
if $which is not of type int, QueryResult, array of int or array of QueryResult
if a remote error occurs
of \Visionline\Crm\WebApi\RelatedRoleQueryResult describing the contacts
queryObjekte(string $type, integer|\Visionline\Crm\WebApi\QueryResult|array $which, integer $max = null, array $filterByRole = null) : array
Queries the real estates of contacts.
string | $type | The entity type (EntityType::Kontakt) |
integer|\Visionline\Crm\WebApi\QueryResult|array | $which | Specifies the contacts for which the real estates should be queried |
integer | $max | specifies the maximum number of results |
array | $filterByRole | Optionally filters the returned documents by the specified file extensions (array of strings) |
if $which is not of type int, QueryResult, array of int or array of QueryResult
if a remote error occurs
of \Visionline\Crm\WebApi\RelatedRoleQueryResult describing the real estates
queryProjekte(string $type, integer|\Visionline\Crm\WebApi\QueryResult|array $which, integer $max = null, array $filterByRole = null) : array|array<mixed,\Visionline\Crm\WebApi\RelatedRoleQueryResult>
Queries the projects of contacts.
string | $type | The entity type (EntityType::Kontakt) |
integer|\Visionline\Crm\WebApi\QueryResult|array | $which | Specifies the contacts for which the projects should be queried |
integer | $max | specifies the maximum number of results |
array | $filterByRole | Optionally filters the returned documents by the specified file extensions (array of strings) |
if $which is not of type int, QueryResult, array of int or array of QueryResult
if a remote error occurs
describing the projects
queryContactImages(integer|\Visionline\Crm\WebApi\QueryResult|array $which) : array|array<mixed,\Visionline\Crm\WebApi\RelatedQueryResult>
Queries the images of the specified contacts
integer|\Visionline\Crm\WebApi\QueryResult|array | $which | Specifies the contacts for which the images should be queried |
if $which is not of type int, QueryResult, array of int or array of QueryResult
if a remote error occurs
describing the website documents
create(string $type, array $values) : integer
Creates an entity of the specified type and sets its fields to the specified values.
string | $type | The type of the entity to create |
array | $values | The values to which the entities fields should be set (associative array where the key is the field identifier and the value the field´s value) |
if a remote error occurs
The id of the created entity
update(string $type, integer $id, array $values)
Updates the entity of the specified type with the specified id and sets it´s fields to the specified values.
string | $type | The type of the entity to update |
integer | $id | The id of the entity to update |
array | $values | The values to which the entity´s fields should be set (associative array where the key is the field identifier and the value the field´s value) |
if a remote error occurs
get(string $type, array|integer $which, array $fields, array $idFields = array()) : array
Gets the values of the fields for the specified entities.
string | $type | The entity type |
array|integer | $which | Specifies for which entities the fields should be returned. This can either be the id of an entity (int), multiple ids of entities (array of int), a query result describing an entity (QueryResult) or multiple query results describing entities (array of QueryResult) |
array | $fields | The requested fields (array of string). The strings in this array have to be UTF-8 encoded. |
array | $idFields | The requested fields as ids (array of string). The strings in this 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.
getFile(array|integer $documents, integer $width = null, integer $height = null, string $resizeMode = null) : string
Returns the content(s) of the specified document(s) and optionally applies resizing (only works for images).
This method should not be called for large files from within an enduser-request, because it blocks until the whole file has been retrieved from the CRM-VISIONLINE system.
array|integer | $documents | The document(s) for which the content should be returned. This can either be the id of the document (int), multiple document ids (array of int), a query result describing a document (QueryResult) or multiple query results describing multiple documents (array of QueryResult). |
integer | $width | The width to which the image should be resized (optional). |
integer | $height | The height to which the image should be resized (optional). |
string | $resizeMode | Specifies how the image should be resized (optional). |
The file contents
saveFile(integer|\Visionline\Crm\WebApi\QueryResult $document, string $directory, boolean $forceDownload = false, integer $width = null, integer $height = null, string $resizeMode = null) : string
Saves the content of the specified document to a file in the specified directory and optionally applies resizing (only works for images).
This method should not be called for large files from within an enduser-request, because it blocks until the whole file has been retrieved from the CRM-VISIONLINE system.
integer|\Visionline\Crm\WebApi\QueryResult | $document | The document for which the content should be saved. This can either be the id of the document (int) or query result describing a document. |
string | $directory | The directory to which the file should be written. |
boolean | $forceDownload | If true, the file is downloaded even if it already exists in the specified directory and is up-to-date regarding the lastModified date (optional). |
integer | $width | The width to which the image should be resized (optional). |
integer | $height | The height to which the image should be resized (optional). |
string | $resizeMode | Specifies how the image should be resized (optional). |
The filename under which the contents have been saved.
saveFiles(array $documents, string $directory, boolean $forceDownload = false, integer $width = null, integer $height = null, string $resizeMode = null) : array
Saves the content of the specified documents to files in the specified directory and optionally applies resizing (only works for images).
This method should not be called for large files from within an enduser-request, because it blocks until the whole file has been retrieved from the CRM-VISIONLINE system.
array | $documents | The documents for which the content should be saved. This can either be ids or query results. |
string | $directory | The directory to which the file should be written. |
boolean | $forceDownload | If true, the file is downloaded even if it already exists in the specified directory and is up-to-date regarding the lastModified date (optional). |
integer | $width | The width to which the images should be resized (optional). |
integer | $height | The height to which the images should be resized (optional). |
string | $resizeMode | Specifies how the images should be resized (optional). |
The filenames under which the files have been saved, where the key is the documents id.
passthruFile(array|integer $document, boolean $sendHeaders = false, integer $width = null, integer $height = null, string $resizeMode = null, boolean $attachment = false)
Outputs the content of the specified document(s) and optionally applies resizing (only works for images).
It is safe to call this method from within an enduser-request, because it immediately outputs chunks of data as they are received from the CRM-VISIONLINE system.
array|integer | $document | The document(s) for which the content should be output. This can either be the id of the document (int), multiple document ids (array of int), a query result describing a document (QueryResult) or multiple query results describing multiple documents (array of QueryResult). |
boolean | $sendHeaders | If true, the HTTP headers 'Content-type' and 'Content-disposition' are sent via header() |
integer | $width | The width to which the image should be resized (optional). |
integer | $height | The height to which the image should be resized (optional). |
string | $resizeMode | Specifies how the image should be resized (optional). |
boolean | $attachment | If true, the HTTP header 'Content-disposition' is set to 'attachment' |
queryEvents(\DateTime|null $fromTimestamp, integer|null $afterId, integer $max) : array<mixed,\Visionline\Crm\WebApi\EventQueryResult>
Calls the webservice method QueryEvents with the specified arguments
\DateTime|null | $fromTimestamp | If supplied, only events that happened at or after this timestamp are returned. |
integer|null | $afterId | If supplied, only events that happened after the event with this ID are returned. |
integer | $max | Specifies the maximum amount of events to return. |
if a remote error occurs
describing the events
getInterests(integer|\Visionline\Crm\WebApi\QueryResult|array $contacts, array $filterByStatus = null) : array
Returns the interests of the specified contact, optionally filtered by status.
integer|\Visionline\Crm\WebApi\QueryResult|array | $contacts | The contacts |
array | $filterByStatus | Filters the interests by their status |
if a remote error occurs
of Interest: the interests of the contacts
updateInterest(\Visionline\Crm\WebApi\Interest $interest)
Updates the specified interest.
\Visionline\Crm\WebApi\Interest | $interest | The Interest to update |
if a remote error occurs
getEnquiries(integer|\Visionline\Crm\WebApi\QueryResult|array $enquiries) : array
Retrieves the specified enquiries
integer|\Visionline\Crm\WebApi\QueryResult|array | $enquiries | The enquiries |
if a remote error occurs
of StoredEnquiry: the enquiries
cacheWrite(string $type, integer $id, integer $lastModified, array $fields, array $idFields = array())
Writes a cache entry.
string | $type | The entity type |
integer | $id | The entity id |
integer | $lastModified | The entitys last modification date |
array | $fields | The entitys fields |
array | $idFields | The entity`s fields with ids instead of names |
cacheRead(string $type, array $results, array $fields, boolean $return_ids = false) : array
Reads a cache entry.
string | $type | The entity type |
array | $results | Results found in the cache are set to this array. |
array | $fields | The entitys fields |
boolean | $return_ids | Whether the cache entry contains IDs instead of values for relation fields |
The ids of the entities that could not be answered from the cache.