Antidot PHP API  version 0.16.0
##PHP API to simplify integration of Antidot components
 All Classes Files Functions Variables Groups Pages
Public Member Functions | Protected Member Functions | List of all members
AfsConnector Class Reference

Base class for all AFS web services. More...

Inheritance diagram for AfsConnector:
AfsConnectorBase AfsConnectorInterface AfsAcpConnector AfsSearchConnector

Public Member Functions

 get_generated_url ()
 Retrieves the URL generated by previous call to send method.
 send (array $parameters)
 Sends a query.

Protected Member Functions

 get_web_service_name ()
 Retrieves web service name.
 build_reply_as_associative_array ($value=true)
 While decoding JSON stream, data can be decoded as associative array.
- Protected Member Functions inherited from AfsConnectorBase
 __construct ($host, AfsService $service=null, $scheme=null, SAI_CurlInterface $curlConnector=null)
 Constructs new base connector.

Detailed Description

Base class for all AFS web services.

Base class for Search, ACP... web services.

Derived class of this class should implement get_web_service_name method.

Member Function Documentation

build_reply_as_associative_array (   $value = true)
protected

While decoding JSON stream, data can be decoded as associative array.

By default, returned object are not converted to associate arrays.

Parameters
$value[in] true (default) to convert object to associative arrays, false to preserve objects as is.
get_generated_url ( )

Retrieves the URL generated by previous call to send method.

This URL can be used as debug purpose.

Returns
Generated URL or null when send has not yet been called.
get_web_service_name ( )
protected

Retrieves web service name.

Derived classes must implement this method.

Returns
name of the web service which should be queried.

Reimplemented in AfsSearchConnector, and AfsAcpConnector.

send ( array  $parameters)

Sends a query.

Query is built using provided parameters.

Parameters
$parameters[in] list of parameters used to build the query.
Returns
JSON decoded reply of the query.

Implements AfsConnectorInterface.