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

Document manager. More...

Public Member Functions

 add_document (AfsDocument $doc, $id=null)
 Add new document to the manager.
 has_document ()
 Check whether at least one document is registered.
 get_documents ()
 Retrieve all managed documents.

Detailed Description

Document manager.

Manage one or more documents to be sent to through Antidot Back Office APIs.

Member Function Documentation

add_document ( AfsDocument  $doc,
  $id = null 
)

Add new document to the manager.

Remarks
The provided id can be used later to remove the document from the list of managed documents.
Any existing document with same id is replaced by new one.
Parameters
$doc[in] new document to be managed (see AfsDocument).
$id[in] identifier associated to the document (default: null).
Exceptions
InvalidArgumentExceptionwhen provided document is invalid.
get_documents ( )

Retrieve all managed documents.

Returns
all documents.
has_document ( )

Check whether at least one document is registered.

Returns
true when one or more documents is managed, false otherwise.