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

AFS PaF connector. More...

Inheritance diagram for AfsPafConnector:
AfsBOWSConnector AfsBOWSConnectorInterface AfsConnectorBase

Public Member Functions

 __construct ($host, AfsService $service, $paf_name, AfsAuthentication $authentication, $scheme=AFS_SCHEME_HTTP, SAI_CurlInterface $curlConnector=null)
 Construct new PaF connector.
 upload_doc (AfsDocument $doc, $comment=null)
 Upload one document to the PaF.
 upload_docs (AfsDocumentManager $mgr, $comment=null)
 Upload one or more documents through document manager.
 get_url ($context=null)
 Retrieves URL using additional parameters.
 get_http_headers ($context=null)
 Retrieves authentication as HTTP header for new authentication policy (>=v7.7)
 set_post_content (&$request, $context)
 Default implementation: do nothing.
- Public Member Functions inherited from AfsBOWSConnector
 __construct ($host, AfsService $service=null, $scheme=AFS_SCHEME_HTTP, SAI_CurlInterface $curlConnector=null)
 Constructs new Back Office Web Service connector.

Detailed Description

AFS PaF connector.

Constructor & Destructor Documentation

__construct (   $host,
AfsService  $service,
  $paf_name,
AfsAuthentication  $authentication,
  $scheme = AFS_SCHEME_HTTP,
SAI_CurlInterface  $curlConnector = null 
)

Construct new PaF connector.

Parameters
$host[in] server hosting the Antidot Back Office.
$service[in] antidot service (see AfsService).
$paf_name[in] name of the PaF.
$authentication[in-out] authentication object (see AfsAuthentication).
$scheme[in] Scheme for the connection URL see Connection scheme (default: AFS_SCHEME_HTTP).
Exceptions
InvalidArgumentExceptioninvalid scheme parameter provided.

Member Function Documentation

get_http_headers (   $context = null)

Retrieves authentication as HTTP header for new authentication policy (>=v7.7)

Parameters
$context[in] Query context.
Returns
Appropriate HTTP header.

Reimplemented from AfsBOWSConnector.

get_url (   $context = null)

Retrieves URL using additional parameters.

Parameters
$context[in] Query context.
Returns
Valid URL which can be queried using CURL.

Implements AfsBOWSConnectorInterface.

set_post_content ( $request,
  $context 
)

Default implementation: do nothing.

Parameters
$request[in] CURL request (not used).
$context[in] Query context (unused).

Reimplemented from AfsBOWSConnector.

upload_doc ( AfsDocument  $doc,
  $comment = null 
)

Upload one document to the PaF.

Parameters
$doc[in] simple document (see AfsDocument).
$comment[in] comment associated to this action (default=null).
Returns
command result (see AfsPafUploadReply).
Exceptions
seeupload_docs method.
upload_docs ( AfsDocumentManager  $mgr,
  $comment = null 
)

Upload one or more documents through document manager.

Parameters
$mgr[in] document manager (see AfsDocumentManager).
$comment[in] comment associated to this action (default=null).
Returns
command result (see AfsPafUploadReply).
Exceptions
InvalidArgumentExceptionwhen no document is being sent.
Exceptionwhen error occured while initializing or executing request.