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 | List of all members
AfsHeaderHelper Class Reference

Helper to retrieve useful information from AFS search engine reply header. More...

Inheritance diagram for AfsHeaderHelper:
AfsHelperBase

Public Member Functions

 __construct ($header)
 Constructs AFS search engine reply header helper.
 in_error ()
 Checks whether an error occured.
 get_error ()
 Retrieves error message.
 get_user_id ()
 Retrieves user identifier.
 get_session_id ()
 Retrieves session identifier.
 get_duration ()
 Retrieves AFS search engine computation duration.
 get_query_parameter ($key)
 Retrieve query parameter stored in header $key : Name of the parameter.
- Public Member Functions inherited from AfsHelperBase
 __get ($name)
 Simple property helper.

Detailed Description

Helper to retrieve useful information from AFS search engine reply header.

Constructor & Destructor Documentation

__construct (   $header)

Constructs AFS search engine reply header helper.

Parameters
$header[in] json decoded header reply.

Member Function Documentation

get_duration ( )

Retrieves AFS search engine computation duration.

You should check whether an error occurred before retrieving duration otherwise you may go into trouble.

Returns
computation duration in milliseconds.
get_error ( )

Retrieves error message.

You should check whether an error occurred before retrieving error message otherwise you may go into trouble.

Returns
detailled error.
get_query_parameter (   $key)

Retrieve query parameter stored in header $key : Name of the parameter.

Returns
value of the parameter
get_session_id ( )

Retrieves session identifier.

You should check whether an error occurred before retrieving session id otherwise you may go into trouble.

Returns
session identifier.
get_user_id ( )

Retrieves user identifier.

You should check whether an error occurred before retrieving user id otherwise you may go into trouble.

Returns
user identifier.
in_error ( )

Checks whether an error occured.

You are encouraged to check error before accessing any other data.

Returns
True on error, false otherwise.