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

Helper to manager title, abstract and uri of one reply. More...

Inheritance diagram for AfsReplyHelper:
AfsBaseReplyHelper AfsHelperBase

Public Member Functions

 __construct ($reply, AfsTextVisitorInterface $visitor=null)
 Construct new instance.
 has_clientdata ()
 Checks whether at least one client data is defined.
 get_clientdatas ()
 Retrieves client data manager.
 get_clientdata ($id='main')
 Retrieves specific client data.
 has_geo_data ()
 check if geo data exists in reply set
 get_geo_data ()
 return the geo data field in current reply set
- Public Member Functions inherited from AfsBaseReplyHelper
 get_title ()
 Retrieves formatted title reply.
 get_abstract ()
 Retrieves formatted abstract reply.
 get_uri ()
 Retrieves URI of the document.
 format ()
 Retrieves reply data as array.
- Public Member Functions inherited from AfsHelperBase
 __get ($name)
 Simple property helper.

Detailed Description

Helper to manager title, abstract and uri of one reply.

You are highly encouraged to use this helper to format each reply.

This helper use same visitor for both title and abstract reply. If none is defined while constructing instance, default implementation is used (see AfsTextVisitor).

In order to deal with client data, you should have to use specific AfsClientDataManager.

Constructor & Destructor Documentation

__construct (   $reply,
AfsTextVisitorInterface  $visitor = null 
)

Construct new instance.

Parameters
$reply[in] should correspond to one reply.
$visitor[in] (optional) visitor used to traverse title and abstract reply texts. Default implementation is used (AfsTextVisitor) when none is provided.

Reimplemented from AfsBaseReplyHelper.

Member Function Documentation

get_clientdata (   $id = 'main')

Retrieves specific client data.

Parameters
$id[in] Id of the client data to retrieve (default: 'main').
Returns
Client data helper with appropriate id
Exceptions
OutOfBoundsExceptionwhen required client data is not found.
get_clientdatas ( )

Retrieves client data manager.

Returns
Manager of client data (see AfsClientDataManager).
Exceptions
Exceptionwhen no client data is available.
get_geo_data ( )

return the geo data field in current reply set

Returns
an array of geo data field values if exists, else null
has_clientdata ( )

Checks whether at least one client data is defined.

Returns
True when one or more clientdatas are available, false otherwise.
has_geo_data ( )

check if geo data exists in reply set

Returns
bool true if geo data exists, else false