![]() |
Antidot PHP API
version 0.16.0
##PHP API to simplify integration of Antidot components
|
Helper for one cluster reply. More...
Public Member Functions | |
__construct ($cluster, AfsMetaHelper $meta, $facet_helper, AfsQuery $query, AfsHelperConfiguration $config) | |
Constructs new cluster helper instance. | |
get_id () | |
Retrieves identifier of the facet value defined for current cluster. | |
get_label () | |
Retrieves label of the facet value defined for current cluster. | |
get_total_replies () | |
Retrieves number of replies in the cluster. | |
has_reply () | |
Checks whether current cluster has replies. | |
get_nb_replies () | |
Retrieves number of replies in current cluster. | |
get_replies () | |
Retrieves all clustered replies. | |
get_query () | |
Retrieves query to filter on current cluster. | |
format () | |
Retrieves cluster as array. | |
![]() | |
__get ($name) | |
Simple property helper. |
Helper for one cluster reply.
__construct | ( | $cluster, | |
AfsMetaHelper | $meta, | ||
$facet_helper, | |||
AfsQuery | $query, | ||
AfsHelperConfiguration | $config | ||
) |
Constructs new cluster helper instance.
$cluster | [in] One cluster reply. |
$meta | [in] Reply set meta data. |
$facet_helper | [in] Facet helper (used to retrieve value label). |
$query | [in] AfsQuery object previously initialized. It is used to generate new query to filter on this cluster reply. |
$config | [in] Helper configuration. |
format | ( | ) |
Retrieves cluster as array.
All data are store in key => value
format:
id:
cluster id (ie identifier of facet value used to make current cluster), label:
cluster label (ie label of the facet value, fallback to id when no label is available), total_replies:
number of replies in current cluster, replies:
list of replies for current cluster (see AfsReplyHelper::format), link:
link which can be used to filter on this specific cluster. You MUST have provided query coder to helper configuration otherwise link is set to empty string.get_id | ( | ) |
Retrieves identifier of the facet value defined for current cluster.
get_label | ( | ) |
Retrieves label of the facet value defined for current cluster.
get_nb_replies | ( | ) |
Retrieves number of replies in current cluster.
get_query | ( | ) |
Retrieves query to filter on current cluster.
Using this query allows to
get_replies | ( | ) |
Retrieves all clustered replies.
get_total_replies | ( | ) |
Retrieves number of replies in the cluster.
has_reply | ( | ) |
Checks whether current cluster has replies.
True
when at least one reply is present, false
otherwise.