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
AfsConceptManager Class Reference

Manager for concept helpers. More...

Inheritance diagram for AfsConceptManager:
AfsHelperBase

Public Member Functions

 add_concept ($replyset)
 Adds new concept reply to concept manager.
 has_concept ()
 Checks whether at least one concept is available.
 get_concepts ()
 Retrieves all concept helpers.
 get_concept ($feed=null)
 Retrieves default, available or specified concept.
- Public Member Functions inherited from AfsHelperBase
 __get ($name)
 Simple property helper.

Detailed Description

Manager for concept helpers.

Each concept result is retrieved as a concept concept helper (see AfsConceptItem).

Member Function Documentation

add_concept (   $replyset)

Adds new concept reply to concept manager.

Parameters
$replyset[in] JSON reply corresponding to a concept reply.
Exceptions
Exceptionwhen invalid replyset has been provided.
get_concept (   $feed = null)

Retrieves default, available or specified concept.

Parameters
$feed[in] Feed for which concept should be retrieved. Default value is null; two cases can occur:
  • there is only one concept reply, this reply is returned,
  • there is multiple concept replies and one corresponds to default concept reply (AFS_DEFAULT_CONCEPT), this one is returned.
Returns
appropriate concept helper (see AfsConceptHelper).
Exceptions
OutOfBoundsExceptionwhen required feed has not produced any concept reply.
get_concepts ( )

Retrieves all concept helpers.

Returns
concept replies.
has_concept ( )

Checks whether at least one concept is available.

Returns
True when one or more concepts is available, false otherwise.