![]() |
Antidot PHP API
version 0.16.0
##PHP API to simplify integration of Antidot components
|
Main helper for AFS search reply. More...
Public Member Functions | |
| __construct ($response, AfsQuery $query, AfsHelperConfiguration $config) | |
| Construct new response helper instance. | |
Replies | |
| has_replyset ($feed=null) | |
| Check whether reponse has a reply. Possible to check reply for on feed or for all feeds. | |
| get_replysets () | |
| Retrieves all replysets. | |
| get_replyset ($feed=null) | |
| Retrieves replyset from the response. | |
Spellcheck | |
| has_spellcheck () | |
| Checks whether at least one spellcheck is defined. | |
| get_spellchecks () | |
| Retrieves spellchecks from the response. | |
| get_spellcheck ($feed=null) | |
| Retrieves default, available or specified spellcheck. | |
Promote | |
| has_promote () | |
| Checks whether at least one promote is available. | |
| get_promotes () | |
| Retrieves all promote helpers. | |
| get_promote () | |
| Retrieves promote replyset helper. | |
Concept | |
| has_concept () | |
| Checks whether at least one concept is available. | |
| get_concepts () | |
| Retrieves all concept helpers. | |
| get_concept ($feed=null) | |
| Retrieves default or specified concept. | |
Public Member Functions inherited from AfsResponseHelperBase | |
| in_error () | |
| Check whether an error has been raised. | |
| get_error_msg () | |
| Retrieve error message. | |
Miscellaneaous | |
| get_duration () | |
| Retrieves AFS search engine computation duration. | |
| format () | |
| Retrieves reply data as array. | |
| get_query_parameter ($key) | |
| Retrieve query parameter stored in header $key : Name of the parameter. | |
Additional Inherited Members | |
Protected Member Functions inherited from AfsResponseHelperBase | |
| set_error_msg ($msg) | |
Main helper for AFS search reply.
This helper is intended to be initiliazed with the reply provided by AfsSearchQueryManager::send. It allows to manage replies of one of the available replysets, including facets and pager. Connection and query errors are managed in a uniform way to simplify integration.
| __construct | ( | $response, | |
| AfsQuery | $query, | ||
| AfsHelperConfiguration | $config | ||
| ) |
Construct new response helper instance.
| $response | [in] result from AfsSearchQueryManager::send call. |
| $query | [in] query which has produced current reply. |
| $config | [in] helper configuration object. |
| InvalidArgumentException | when one of the parameters is invalid. |
| format | ( | ) |
Retrieves reply data as array.
This method is intended for internal use only.
All data are stored in key => value format:
replysets: replies per feed, spellchecks: spellcheck replies per feed.| get_concept | ( | $feed = null | ) |
Retrieves default or specified concept.
For more details see AfsConceptManager::get_concept.
| $feed | [in] Concept generated by this feed should be retrieved (default: default concept is retrieved). |
| get_concepts | ( | ) |
Retrieves all concept helpers.
| get_duration | ( | ) |
Retrieves AFS search engine computation duration.
Individual durations are available for each replyset, see AfsReplysetHelper for more details.
| get_promote | ( | ) |
Retrieves promote replyset helper.
This allows to retrieve metadata of the promote. For more details see AfsPromoteReplysetHelper.
| get_promotes | ( | ) |
Retrieves all promote helpers.
| get_query_parameter | ( | $key | ) |
Retrieve query parameter stored in header $key : Name of the parameter.
| get_replyset | ( | $feed = null | ) |
Retrieves replyset from the response.
| $feed | [in] name of the feed to filter on (default: null -> retrieves first replyset). |
| get_replysets | ( | ) |
Retrieves all replysets.
| get_spellcheck | ( | $feed = null | ) |
Retrieves default, available or specified spellcheck.
| $feed | [in] Feed for which spellcheck should be retrieved. Default value is null, two cases can occur:
|
| OutOfBoundsException | when required feed has not produced any spellcheck reply. |
| get_spellchecks | ( | ) |
Retrieves spellchecks from the response.
| has_concept | ( | ) |
Checks whether at least one concept is available.
True when one or more concepts is available, false otherwise. | has_promote | ( | ) |
Checks whether at least one promote is available.
True when one or more promotes is available, false otherwise. | has_replyset | ( | $feed = null | ) |
Check whether reponse has a reply. Possible to check reply for on feed or for all feeds.
| $feed | name to be checked |
| has_spellcheck | ( | ) |
Checks whether at least one spellcheck is defined.
True when one or more spellchecks are defined, false otherwise.
1.8.1.2