Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Zend_Service_LiveDocx Class Reference

Public Member Functions

 __construct ($options=null)
 Constructor.
 
 setOptions (array $options)
 Set options One or more of username, password, soapClient.
 
 __destruct ()
 Clean up and log out of LiveDocx service.
 
 getSoapClient ()
 Get SOAP client.
 
 setSoapClient (Zend_Soap_Client $soapClient)
 Set SOAP client.
 
 logIn ()
 Log in to LiveDocx service.
 
 logOut ()
 Log out of the LiveDocx service.
 
 isLoggedIn ()
 Return true, if session is currently logged into the backend server.
 
 setUsername ($username)
 Set username.
 
 setPassword ($password)
 Set password.
 
 setWsdl ($wsdl)
 Set WSDL of LiveDocx web service.
 
 getUsername ()
 Return current username.
 
 getPassword ()
 Return current password.
 
 getWsdl ()
 Return WSDL of LiveDocx web service.
 
 getFormat ($filename)
 Return the document format (extension) of a filename.
 
 getVersion ()
 Return the current API version.
 
 compareVersion ($version)
 Compare the current API version with another version.
 

Public Attributes

const VERSION = '2.0'
 LiveDocx service version.
 

Protected Member Functions

 _initSoapClient ($endpoint)
 Init Soap client - connect to SOAP service.
 

Protected Attributes

 $_soapClient
 
 $_wsdl
 
 $_credentials
 
 $_loggedIn
 

Constructor & Destructor Documentation

__construct (   $options = null)

Constructor.

Optionally, pass an array of options (or Zend_Config object).

If an option with the key 'soapClient' is provided, that value will be used to set the internal SOAP client used to connect to the LiveDocx service.

Use 'soapClient' in the case that you have a dedicated or (locally installed) licensed LiveDocx server. For example:

{code} $phpLiveDocx = new Zend_Service_LiveDocx_MailMerge( array ( 'username' => 'myUsername', 'password' => 'myPassword', 'soapClient' => new Zend_Soap_Client('https://api.example.com/path/mailmerge.asmx?WSDL') ) ); {code}

Replace the URI of the WSDL in the constructor of Zend_Soap_Client with that of your dedicated or licensed LiveDocx server.

If you are using the public LiveDocx server, simply pass 'username' and 'password'. For example:

{code} $phpLiveDocx = new Zend_Service_LiveDocx_MailMerge( array ( 'username' => 'myUsername', 'password' => 'myPassword' ) ); {code}

If you prefer to not pass the username and password through the constructor, you can also call the following methods:

{code} $phpLiveDocx = new Zend_Service_LiveDocx_MailMerge();

$phpLiveDocx->setUsername('myUsername') ->setPassword('myPassword'); {/code}

Or, if you want to specify your own SoapClient:

{code} $phpLiveDocx = new Zend_Service_LiveDocx_MailMerge();

$phpLiveDocx->setUsername('myUsername') ->setPassword('myPassword');

$phpLiveDocx->setSoapClient( new Zend_Soap_Client('https://api.example.com/path/mailmerge.asmx?WSDL') ); {/code}

Parameters
array | Zend_Config$options
Returns
void
Exceptions
Zend_Service_LiveDocx_Exception
Since
LiveDocx 1.0
__destruct ( )

Clean up and log out of LiveDocx service.

Returns
boolean
Since
LiveDocx 1.0

Member Function Documentation

_initSoapClient (   $endpoint)
protected

Init Soap client - connect to SOAP service.

Parameters
string$endpoint
Exceptions
Zend_Service_LiveDocx_Exception
Returns
void
Since
LiveDocx 1.2
compareVersion (   $version)

Compare the current API version with another version.

Parameters
string$version(STRING NOT FLOAT)
Returns
int -1 (version is less than API version), 0 (versions are equal), or 1 (version is greater than API version)
Since
LiveDocx 1.0
getFormat (   $filename)

Return the document format (extension) of a filename.

Parameters
string$filename
Returns
string
Since
LiveDocx 1.0
getPassword ( )

Return current password.

Returns
string|null
Since
LiveDocx 1.0
getSoapClient ( )

Get SOAP client.

Returns
Zend_Soap_Client
Since
LiveDocx 1.2
getUsername ( )

Return current username.

Returns
string|null
Since
LiveDocx 1.0
getVersion ( )

Return the current API version.

Returns
string
Since
LiveDocx 1.0
getWsdl ( )

Return WSDL of LiveDocx web service.

Returns
Zend_Service_LiveDocx
Since
LiveDocx 1.0
isLoggedIn ( )

Return true, if session is currently logged into the backend server.

Returns
boolean
Since
LiveDocx 1.2
logIn ( )

Log in to LiveDocx service.

Parameters
string$username
string$password
Exceptions
Zend_Service_LiveDocx_Exception
Returns
boolean
Since
LiveDocx 1.2
logOut ( )

Log out of the LiveDocx service.

Exceptions
Zend_Service_LiveDocx_Exception
Returns
boolean
Since
LiveDocx 1.2
setOptions ( array  $options)

Set options One or more of username, password, soapClient.

Parameters
array$options
Returns
Zend_Service_LiveDocx
Since
LiveDocx 1.2
setPassword (   $password)

Set password.

Returns
Zend_Service_LiveDocx
Since
LiveDocx 1.0
setSoapClient ( Zend_Soap_Client  $soapClient)

Set SOAP client.

Parameters
Zend_Soap_Client$soapClient
Returns
Zend_Service_LiveDocx
Since
LiveDocx 1.2
setUsername (   $username)

Set username.

Returns
Zend_Service_LiveDocx
Since
LiveDocx 1.0
setWsdl (   $wsdl)

Set WSDL of LiveDocx web service.

Returns
Zend_Service_LiveDocx
Since
LiveDocx 1.0

Member Data Documentation

$_credentials
protected
$_loggedIn
protected
$_soapClient
protected
$_wsdl
protected
const VERSION = '2.0'

LiveDocx service version.

Since
LiveDocx 1.0