Service/LiveDocx.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Service
- Subpackage
- LiveDocx
- Version
- $Id: LiveDocx.php 25024 2012-07-30 15:08:15Z rob $
\Zend_Service_LiveDocx
- Children
- \Zend_Service_LiveDocx_MailMerge
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Since
- LiveDocx 1.0
Constants
Properties


array $_credentials =
Array of credentials (username and password) to log into backend server
- Type
- array
- Since
- LiveDocx 1.2


boolean $_loggedIn =
Set to true, when session is logged into backend server
- Type
- boolean
- Since
- LiveDocx 1.2


\Zend_Soap_Client $_soapClient =
SOAP client used to connect to LiveDocx service
- Type
- \Zend_Soap_Client
- Since
- LiveDocx 1.0
Methods


__construct(array | \Zend_Config $options = null) : void
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}
Name | Type | Description |
---|---|---|
$options | array | \Zend_Config |
Exception | Description |
---|---|
\Zend_Service_LiveDocx_Exception |
- Since
- LiveDocx 1.0


__destruct() : boolean
Clean up and log out of LiveDocx service
Type | Description |
---|---|
boolean |
- Since
- LiveDocx 1.0


_initSoapClient(string $endpoint) : void
Init Soap client - connect to SOAP service
Name | Type | Description |
---|---|---|
$endpoint | string |
Exception | Description |
---|---|
\Zend_Service_LiveDocx_Exception |
- Since
- LiveDocx 1.2


compareVersion(string $version) : int
Compare the current API version with another version
Name | Type | Description |
---|---|---|
$version | string | (STRING NOT FLOAT) |
Type | Description |
---|---|
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(string $filename) : string
Return the document format (extension) of a filename
Name | Type | Description |
---|---|---|
$filename | string |
Type | Description |
---|---|
string |
- Since
- LiveDocx 1.0


getPassword() : string | null
Return current password
Type | Description |
---|---|
string | null |
- Since
- LiveDocx 1.0


getSoapClient() : \Zend_Soap_Client
Get SOAP client
Type | Description |
---|---|
\Zend_Soap_Client |
- Since
- LiveDocx 1.2


getUsername() : string | null
Return current username
Type | Description |
---|---|
string | null |
- Since
- LiveDocx 1.0


getVersion() : string
Return the current API version
Type | Description |
---|---|
string |
- Since
- LiveDocx 1.0


getWsdl() : \Zend_Service_LiveDocx
Return WSDL of LiveDocx web service
Type | Description |
---|---|
\Zend_Service_LiveDocx |
- Since
- LiveDocx 1.0


isLoggedIn() : boolean
Return true, if session is currently logged into the backend server
Type | Description |
---|---|
boolean |
- Since
- LiveDocx 1.2


logIn() : boolean
Log in to LiveDocx service
Type | Description |
---|---|
boolean |
Exception | Description |
---|---|
\Zend_Service_LiveDocx_Exception |
- Since
- LiveDocx 1.2


logOut() : boolean
Log out of the LiveDocx service
Type | Description |
---|---|
boolean |
Exception | Description |
---|---|
\Zend_Service_LiveDocx_Exception |
- Since
- LiveDocx 1.2


setOptions(array $options) : \Zend_Service_LiveDocx
Set options One or more of username, password, soapClient
Name | Type | Description |
---|---|---|
$options | array |
Type | Description |
---|---|
\Zend_Service_LiveDocx |
- Since
- LiveDocx 1.2


setPassword( $password) : \Zend_Service_LiveDocx
Set password
Name | Type | Description |
---|---|---|
$password |
Type | Description |
---|---|
\Zend_Service_LiveDocx |
- Since
- LiveDocx 1.0


setSoapClient(\Zend_Soap_Client $soapClient) : \Zend_Service_LiveDocx
Set SOAP client
Name | Type | Description |
---|---|---|
$soapClient | \Zend_Soap_Client |
Type | Description |
---|---|
\Zend_Service_LiveDocx |
- Since
- LiveDocx 1.2


setUsername( $username) : \Zend_Service_LiveDocx
Set username
Name | Type | Description |
---|---|---|
$username |
Type | Description |
---|---|
\Zend_Service_LiveDocx |
- Since
- LiveDocx 1.0


setWsdl( $wsdl) : \Zend_Service_LiveDocx
Set WSDL of LiveDocx web service
Name | Type | Description |
---|---|---|
$wsdl |
Type | Description |
---|---|
\Zend_Service_LiveDocx |
- Since
- LiveDocx 1.0