![]() |
Antidot PHP API
version 0.16.0
##PHP API to simplify integration of Antidot components
|
Helper representing one suggestion reply. More...
Public Member Functions | |
__construct ($suggestion, $meta, AfsAcpConfiguration $config=null) | |
Constructs new ACP suggestion helper. | |
get_value () | |
Retrieves suggestion value. | |
get_search_query () | |
Gets AFS search query associated to this suggestion value. | |
Meta data | |
has_option ($name=null) | |
Checks whether mete data (options) are available. | |
get_option ($name) | |
Retrieves specified meta data. | |
get_options () | |
Retrieves all meta data associated to current suggestion value. | |
Miscellaneous | |
format () | |
Retrieves suggestions as array. | |
![]() | |
__get ($name) | |
Simple property helper. |
Helper representing one suggestion reply.
This class is not intended to be instanciated manually.
__construct | ( | $suggestion, | |
$meta, | |||
AfsAcpConfiguration | $config = null |
||
) |
Constructs new ACP suggestion helper.
$suggestion | [in] Suggestion value. |
$meta | [in] Meta data associated to the suggestion value (may be null). |
$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:
value:
suggestion value, options:
map of meta data key-value pairs.get_option | ( | $name | ) |
Retrieves specified meta data.
$name | [in] name of the requested meta data. |
OutOfBoundsException | when requested meta data is unavailable. |
get_options | ( | ) |
Retrieves all meta data associated to current suggestion value.
get_search_query | ( | ) |
Gets AFS search query associated to this suggestion value.
AFS search query is initialized with appropriate search word and from
parameter is set to AfsOrigin::ACP.
get_value | ( | ) |
Retrieves suggestion value.
has_option | ( | $name = null | ) |
Checks whether mete data (options) are available.
$name | [in] name of meta data to check. Default is null to test whether at least one meta data is available. |
true
when required meta data is present or least one meta data is available, false
otherwise.