category Zend
package Zend_Service
subpackage LiveDocx
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
since LiveDocx 1.0
inherited_from \Zend_Service_LiveDocx

 Methods

Constructor (LiveDocx.MailMerge SOAP Service)

__construct(array|\Zend_Config $options = null) : void: \throws

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}

since LiveDocx 1.0
inherited_from \Zend_Service_LiveDocx::__construct()

Parameters

$options

Returns

\throwsZend_Service_LiveDocx_Exception

Constructor

__construct(array|\Zend_Config $options = null
Inherited

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}

since LiveDocx 1.0

Parameters

$options

array\Zend_Config

Exceptions

\Zend_Service_LiveDocx_Exception

Clean up and log out of LiveDocx service

__destruct() : boolean
Inherited
since LiveDocx 1.0

Returns

boolean

Assign values to template fields

assign(array|string $field, array|string $value = null) : \Zend_Service_LiveDocx_MailMerge
since LiveDocx 1.0

Parameters

$field

arraystring

$value

arraystring

Exceptions

\Zend_Service_LiveDocx_Exception

Returns

\Zend_Service_LiveDocx_MailMerge

Convert assoc array to required SOAP type

assocArrayToArrayOfArrayOfString(array $assoc) : array
Static
since LiveDocx 1.0

Parameters

$assoc

array

Returns

array

Compare the current API version with another version

compareVersion(string $version) : integer
Inherited
since LiveDocx 1.0

Parameters

$version

string

(STRING NOT FLOAT)

Returns

integer-1 (version is less than API version), 0 (versions are equal), or 1 (version is greater than API version)

Merge assigned data with template to generate document

createDocument() : void
since LiveDocx 1.0

Exceptions

\Zend_Service_LiveDocx_Excpetion

Delete an image file from LiveDocx service

deleteImage(string $filename) : void
since LiveDocx 2.0

Parameters

$filename

string

Exceptions

\Zend_Service_LiveDocx_Exception

Delete a shared document from LiveDocx service

deleteSharedDocument(string $filename) : void
since LiveDocx 1.0

Parameters

$filename

string

Delete a template file from LiveDocx service

deleteTemplate(string $filename) : void
since LiveDocx 1.0

Parameters

$filename

string

Exceptions

\Zend_Service_LiveDocx_Exception

Download an image file from LiveDocx service

downloadImage(string $filename) : void
since LiveDocx 2.0

Parameters

$filename

string

Exceptions

\Zend_Service_LiveDocx_Exception

downloadSharedDocument()

downloadSharedDocument($filename) 

Parameters

$filename

Download template file from LiveDocx service

downloadTemplate(string $filename) : \binary
since LiveDocx 1.0

Parameters

$filename

string

Exceptions

\Zend_Service_LiveDocx_Exception

Returns

\binary

Return graphical bitmap data for all pages of created document Return array contains bitmap data (binary) - array key is page number

getAllBitmaps(integer $zoomFactor, string $format) : array
since LiveDocx 1.2

Parameters

$zoomFactor

integer

$format

string

Returns

array

Return WMF (aka Windows metafile) data for pages of created document Return array contains WMF data (binary) - array key is page number

getAllMetafiles() : array
since LiveDocx 1.2

Returns

array

Return graphical bitmap data for specified page range of created document Return array contains bitmap data (binary) - array key is page number

getBitmaps(integer $fromPage, integer $toPage, integer $zoomFactor, string $format) : array
since LiveDocx 1.2

Parameters

$fromPage

integer

$toPage

integer

$zoomFactor

integer

$format

string

Returns

array

Return all the block fields in the template

getBlockFieldNames(string $blockName) : array
since LiveDocx 1.0

Parameters

$blockName

string

Returns

array

Return all the block fields in the template

getBlockNames() : array
since LiveDocx 1.0

Returns

array

Return supported document access options

getDocumentAccessOptions() : array
since LiveDocx 1.2 Premium

Returns

array

Return supported document formats (lowercase)

getDocumentFormats() : array
since LiveDocx 1.1

Returns

array

Return all the fields in the template

getFieldNames() : array
since LiveDocx 1.0

Returns

array

Return the names of all fonts that are installed on backend server

getFontNames() : array
since LiveDocx 1.2

Returns

array

Return the document format (extension) of a filename

getFormat(string $filename) : string
Inherited
since LiveDocx 1.0

Parameters

$filename

string

Returns

string

Return supported image formats to which can be exported (lowercase)

getImageExportFormats() : array
since LiveDocx 2.0

Returns

array

getImageFormats()

getImageFormats() 

Return supported image formats from which can be imported (lowercase)

getImageImportFormats() : array
since LiveDocx 2.0

Returns

array

Return WMF (aka Windows metafile) data for specified page range of created document Return array contains WMF data (binary) - array key is page number

getMetafiles(integer $fromPage, integer $toPage) : array
since LiveDocx 1.2

Parameters

$fromPage

integer

$toPage

integer

Returns

array

Return current password

getPassword() : string | null
Inherited
since LiveDocx 1.0

Returns

stringnull

Get SOAP client

getSoapClient() : \Zend_Soap_Client
Inherited
since LiveDocx 1.2

Returns

\Zend_Soap_Client

Return supported template formats (lowercase)

getTemplateFormats() : array
since LiveDocx 1.0

Returns

array

Return current username

getUsername() : string | null
Inherited
since LiveDocx 1.0

Returns

stringnull

Return the current API version

getVersion() : string
Inherited
since LiveDocx 1.0

Returns

string

Return WSDL of LiveDocx web service

getWsdl() : string
Inherited
since LiveDocx 1.0

Returns

string

Check whether an image file is available on LiveDocx service

imageExists(string $filename) : boolean
since LiveDocx 2.0

Parameters

$filename

string

Returns

boolean

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

isLoggedIn() : boolean
Inherited
since LiveDocx 1.2

Returns

boolean

List all images stored on LiveDocx service

listImages() : array
since LiveDocx 2.0

Returns

array

List all shared documents stored on LiveDocx service

listSharedDocuments() : array
since LiveDocx 1.0

Returns

array

List all templates stored on LiveDocx service

listTemplates() : array
since LiveDocx 1.0

Returns

array

Log out of the LiveDocx service

logOut() : boolean
Inherited
since LiveDocx 1.2

Exceptions

\Zend_Service_LiveDocx_Exception

Returns

boolean

Convert multi assoc array to required SOAP type

multiAssocArrayToArrayOfArrayOfString(array $multi) : array
Static
since LiveDocx 1.0

Parameters

$multi

array

Returns

array

Retrieve document in specified format

retrieveDocument(string $format) : \binary
since LiveDocx 1.0

Parameters

$format

string

Exceptions

\Zend_Service_LiveDocx_Exception

Returns

\binary

Set block field values

setBlockFieldValues(string $blockName, array $blockFieldValues) : \Zend_Service_LiveDocx_MailMerge
since LiveDocx 1.0

Parameters

$blockName

string

$blockFieldValues

array

Exceptions

\Zend_Service_LiveDocx_Exception

Returns

\Zend_Service_LiveDocx_MailMerge

Set a master password for document and determine which security features are accessible without using the master password.

setDocumentAccessPermissions(array $permissions, string $password) : \Zend_Service_LiveDocx_MailMerge

As default, nothing is allowed. To allow a security setting, explicatively set it using one of he DOCUMENT_ACCESSPERMISSION* class constants.

{code} $phpLiveDocx->setDocumentAccessPermissions( array ( Zend_Service_LiveDocx_MailMerge::DOCUMENT_ACCESS_PERMISSION_ALLOW_PRINTING_HIGH_LEVEL, Zend_Service_LiveDocx_MailMerge::DOCUMENT_ACCESS_PERMISSION_ALLOW_EXTRACT_CONTENTS ), 'myDocumentAccessPassword' ); {code}

This method can only be used for PDF documents

since LiveDocx 1.2 Premium

Parameters

$permissions

array

$password

string

Exceptions

\Zend_Service_LiveDocx_Exception

Returns

\Zend_Service_LiveDocx_MailMerge

Set a password to open to document

setDocumentPassword(string $password) : \Zend_Service_LiveDocx_MailMerge

This method can only be used for PDF documents

since LiveDocx 1.2 Premium

Parameters

$password

string

Exceptions

\Zend_Service_LiveDocx_Exception

Returns

\Zend_Service_LiveDocx_MailMerge

Set an array of key and value or array of values

setFieldValue(string $field, array|string $value) : \Zend_Service_LiveDocx_MailMerge
since LiveDocx 1.0

Parameters

$field

string

$value

arraystring

Exceptions

\Zend_Service_LiveDocx_Exception

Returns

\Zend_Service_LiveDocx_MailMerge

Set an associative or multi-associative array of keys and values pairs

setFieldValues(array $values) : \Zend_Service_LiveDocx_MailMerge
since LiveDocx 1.0

Parameters

$values

array

Exceptions

\Zend_Service_LiveDocx_Exception

Returns

\Zend_Service_LiveDocx_MailMerge

Set the filename of a LOCAL template (i.e. a template stored locally on YOUR server)

setLocalTemplate(string $filename) : \Zend_Service_LiveDocx_MailMerge
since LiveDocx 1.0

Parameters

$filename

string

Exceptions

\Zend_Service_LiveDocx_Exception

Returns

\Zend_Service_LiveDocx_MailMerge

Set options One or more of username, password, soapClient

setOptions(array $options) : \Zend_Service_LiveDocx
Inherited
since LiveDocx 1.2

Parameters

$options

array

Returns

\Zend_Service_LiveDocx

Set password

setPassword(string $password) : \Zend_Service_LiveDocx
Inherited
since LiveDocx 1.0

Parameters

$password

string

Returns

\Zend_Service_LiveDocx

Set the filename of a REMOTE template (i.e. a template stored remotely on the LIVEDOCX server)

setRemoteTemplate(string $filename) : \Zend_Service_LiveDocx_MailMerge
since LiveDocx 1.0

Parameters

$filename

string

Exceptions

\Zend_Service_LiveDocx_Exception

Returns

\Zend_Service_LiveDocx_MailMerge

Set SOAP client

setSoapClient(\Zend_Soap_Client $soapClient) : \Zend_Service_LiveDocx
Inherited
since LiveDocx 1.2

Parameters

$soapClient

\Zend_Soap_Client

Returns

\Zend_Service_LiveDocx

Set username

setUsername(string $username) : \Zend_Service_LiveDocx
Inherited
since LiveDocx 1.0

Parameters

$username

string

Returns

\Zend_Service_LiveDocx

Set WSDL of LiveDocx web service

setWsdl(string $wsdl) : \Zend_Service_LiveDocx
Inherited
since LiveDocx 1.0

Parameters

$wsdl

string

Returns

\Zend_Service_LiveDocx

Share a document - i.e. the document is available to all over the Internet

shareDocument() : string
since LiveDocx 1.0

Returns

string

Check whether a shared document is available on LiveDocx service

sharedDocumentExists(string $filename) : boolean
since LiveDocx 1.0

Parameters

$filename

string

Returns

boolean

Check whether a template file is available on LiveDocx service

templateExists(string $filename) : boolean
since LiveDocx 1.0

Parameters

$filename

string

Returns

boolean

Upload an image file to LiveDocx service

uploadImage(string $filename) : void
since LiveDocx 2.0

Parameters

$filename

string

Exceptions

\Zend_Service_LiveDocx_Exception

Upload a template file to LiveDocx service

uploadTemplate(string $filename) : void
since LiveDocx 1.0

Parameters

$filename

string

Exceptions

\Zend_Service_LiveDocx_Exception

Convert LiveDocx service return value from list methods to consistent PHP array

_backendListArrayToMultiAssocArray(array $list) : array
since LiveDocx 1.0

Parameters

$list

array

Returns

array

Init Soap client - connect to SOAP service

_initSoapClient(string $endpoint) : void
Inherited
since LiveDocx 1.2

Parameters

$endpoint

string

Exceptions

\Zend_Service_LiveDocx_Exception

 Properties

 

Block field values

$_blockFieldValues : array

Default

since LiveDocx 1.0
 

Array of credentials (username and password) to log into backend server

$_credentials : array

Default

since LiveDocx 1.2
 

Field values

$_fieldValues : array

Default

since LiveDocx 1.0
 

Set to true, when session is logged into backend server

$_loggedIn : boolean

Default

since LiveDocx 1.2
 

SOAP client used to connect to LiveDocx service

$_soapClient : \Zend_Soap_Client

Default

since LiveDocx 1.0
 

WSDL of LiveDocx web service

$_wsdl : string

Default

since LiveDocx 1.0

 Constants

 

LiveDocx service version

VERSION = '2.0' 
since LiveDocx 1.0
 

WSDL

WSDL = 'https://api.livedocx.com/2.0/mailmerge.asmx?WSDL'