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
\throws
Zend_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}
Parameters
$options
array
\Zend_Config
Exceptions
\Zend_Service_LiveDocx_Exception |
|
Clean up and log out of LiveDocx service
__destruct() : boolean
Inherited
Assign values to template fields
assign(array|string $field, array|string $value = null
) : \Zend_Service_LiveDocx_MailMerge
Parameters
$field
array
string
$value
array
string
Exceptions
\Zend_Service_LiveDocx_Exception |
|
Returns
\Zend_Service_LiveDocx_MailMerge
Convert assoc array to required SOAP type
assocArrayToArrayOfArrayOfString(array $assoc) : array
Static
Parameters
$assoc
array
Returns
array
Compare the current API version with another version
compareVersion(string $version) : integer
Inherited
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
Exceptions
\Zend_Service_LiveDocx_Excpetion |
|
Delete an image file from LiveDocx service
deleteImage(string $filename) : void
Parameters
$filename
string
Exceptions
\Zend_Service_LiveDocx_Exception |
|
Delete a shared document from LiveDocx service
deleteSharedDocument(string $filename) : void
Parameters
$filename
string
Delete a template file from LiveDocx service
deleteTemplate(string $filename) : void
Parameters
$filename
string
Exceptions
\Zend_Service_LiveDocx_Exception |
|
Download an image file from LiveDocx service
downloadImage(string $filename) : void
Parameters
$filename
string
Exceptions
\Zend_Service_LiveDocx_Exception |
|
downloadSharedDocument()
downloadSharedDocument($filename)
Download template file from LiveDocx service
downloadTemplate(string $filename) : \binary
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
Parameters
$zoomFactor
integer
$format
string
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
Parameters
$fromPage
integer
$toPage
integer
$zoomFactor
integer
$format
string
Returns
array
Return all the block fields in the template
getBlockFieldNames(string $blockName) : array
Parameters
$blockName
string
Returns
array
Return all the block fields in the template
getBlockNames() : array
Return supported document access options
getDocumentAccessOptions() : array
since |
LiveDocx 1.2 Premium |
Returns
array
Return all the fields in the template
getFieldNames() : array
Return the names of all fonts that are installed on backend server
getFontNames() : array
Return current password
getPassword() : string | null
Inherited
Get SOAP client
getSoapClient() : \Zend_Soap_Client
Inherited
Returns
\Zend_Soap_Client
Return current username
getUsername() : string | null
Inherited
Return the current API version
getVersion() : string
Inherited
Return WSDL of LiveDocx web service
getWsdl() : string
Inherited
Check whether an image file is available on LiveDocx service
imageExists(string $filename) : boolean
Parameters
$filename
string
Returns
boolean
Return true, if session is currently logged into the backend server
isLoggedIn() : boolean
Inherited
List all images stored on LiveDocx service
listImages() : array
List all shared documents stored on LiveDocx service
listSharedDocuments() : array
List all templates stored on LiveDocx service
listTemplates() : array
Log in to LiveDocx service
logIn() : boolean
Inherited
Exceptions
\Zend_Service_LiveDocx_Exception |
|
Returns
boolean
Log out of the LiveDocx service
logOut() : boolean
Inherited
Exceptions
\Zend_Service_LiveDocx_Exception |
|
Returns
boolean
Convert multi assoc array to required SOAP type
multiAssocArrayToArrayOfArrayOfString(array $multi) : array
Static
Parameters
$multi
array
Returns
array
Retrieve document in specified format
retrieveDocument(string $format) : \binary
Parameters
$format
string
Exceptions
\Zend_Service_LiveDocx_Exception |
|
Returns
\binary
Set block field values
setBlockFieldValues(string $blockName, array $blockFieldValues) : \Zend_Service_LiveDocx_MailMerge
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
Parameters
$field
string
$value
array
string
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
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
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
Parameters
$options
array
Returns
\Zend_Service_LiveDocx
Set password
setPassword(string $password) : \Zend_Service_LiveDocx
Inherited
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
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
Parameters
$soapClient
\Zend_Soap_Client
Returns
\Zend_Service_LiveDocx
Set username
setUsername(string $username) : \Zend_Service_LiveDocx
Inherited
Parameters
$username
string
Returns
\Zend_Service_LiveDocx
Set WSDL of LiveDocx web service
setWsdl(string $wsdl) : \Zend_Service_LiveDocx
Inherited
Parameters
$wsdl
string
Returns
\Zend_Service_LiveDocx
Share a document - i.e. the document is available to all over the Internet
shareDocument() : string
Check whether a shared document is available on LiveDocx service
sharedDocumentExists(string $filename) : boolean
Parameters
$filename
string
Returns
boolean
Check whether a template file is available on LiveDocx service
templateExists(string $filename) : boolean
Parameters
$filename
string
Returns
boolean
Upload an image file to LiveDocx service
uploadImage(string $filename) : void
Parameters
$filename
string
Exceptions
\Zend_Service_LiveDocx_Exception |
|
Upload a template file to LiveDocx service
uploadTemplate(string $filename) : void
Parameters
$filename
string
Exceptions
\Zend_Service_LiveDocx_Exception |
|
Convert LiveDocx service return value from list methods to consistent PHP array
_backendListArrayToMultiAssocArray(array $list) : array
Parameters
$list
array
Returns
array
Init Soap client - connect to SOAP service
_initSoapClient(string $endpoint) : void
Inherited
Parameters
$endpoint
string
Exceptions
\Zend_Service_LiveDocx_Exception |
|
Properties
Block field values
$_blockFieldValues : array
Array of credentials (username and password) to log into backend server
$_credentials : array
Field values
$_fieldValues : array
Set to true, when session is logged into backend server
$_loggedIn : boolean
SOAP client used to connect to LiveDocx service
$_soapClient : \Zend_Soap_Client
WSDL of LiveDocx web service
$_wsdl : string
Constants
LiveDocx service version
VERSION = '2.0'
WSDL
WSDL = 'https://api.livedocx.com/2.0/mailmerge.asmx?WSDL'