![]() |
Antidot PHP API
version 0.16.0
##PHP API to simplify integration of Antidot components
|
Main helper for AFS ACP reply. More...
Public Member Functions | |
__construct ($response, AfsAcpConfiguration $config=null) | |
Constructs new ACP response helper. | |
get_query_string () | |
Retrieves query string. | |
Replies | |
has_replyset () | |
Checks whether there is suggestion. | |
get_replysets () | |
Retrieves all suggestions from all feeds. | |
get_replyset ($feed='') | |
Retrieves suggestions from specific feed. | |
Miscellaneous | |
format () | |
Retrieves suggestions as array. | |
![]() | |
in_error () | |
Check whether an error has been raised. | |
get_error_msg () | |
Retrieve error message. |
Additional Inherited Members | |
![]() | |
set_error_msg ($msg) |
Main helper for AFS ACP reply.
This helper is intended to be initialized with reply from AfsAcpQueryManager::send. It allows to manage suggestions from one or more feeds.
__construct | ( | $response, | |
AfsAcpConfiguration | $config = null |
||
) |
Constructs new ACP response helper.
$response | [in] Json decoded reply. |
$config | [in] ACP configuration. |
format | ( | ) |
Retrieves suggestions as array.
This method is intended for internal use only.
All data are stored in key => value
format:
feed name
: suggestions per feed, Or, in case of error: error:
error message.get_query_string | ( | ) |
Retrieves query string.
get_replyset | ( | $feed = '' | ) |
Retrieves suggestions from specific feed.
$feed | [in] name of the feed to filter on (default: empty string -> retrieves generic spellcheck if any, otherwise raise exception) |
OutOfBoundsException | when required feed does not exist. This also happen when no feed name is provided whereas all suggestions are associated to named feeds. |
get_replysets | ( | ) |
Retrieves all suggestions from all feeds.
Map of suggestions where the key corresponds to the name of feed which has generated suggestions and the value corresponds to suggestion helper.
has_replyset | ( | ) |
Checks whether there is suggestion.
true
when at least one suggestion is available, false
otherwise.