/demos/Zend/Service/LiveDocx/MailMerge/constructors/public.php
https://github.com/decaoz/zf1 · PHP · 58 lines · 41 code · 15 blank · 2 comment · 0 complexity · 9ba6e2803969310bbc10ef44e1e6cacb MD5 · raw file
- <?php
- require_once dirname(__FILE__) . '/../../common.php';
- system('clear');
- print(Demos_Zend_Service_LiveDocx_Helper::wrapLine(
- PHP_EOL . 'Using the Free Public Server' .
- PHP_EOL .
- PHP_EOL . 'This sample application illustrates how to use Zend_Service_LiveDocx_MailMerge with the free, public LiveDocx server.' .
- PHP_EOL .
- PHP_EOL)
- );
- $mailMerge = new Zend_Service_LiveDocx_MailMerge();
- $mailMerge->setUsername(DEMOS_ZEND_SERVICE_LIVEDOCX_USERNAME)
- ->setPassword(DEMOS_ZEND_SERVICE_LIVEDOCX_PASSWORD);
- $mailMerge->getTemplateFormats(); // then call methods as usual
- printf('Username : %s%sPassword : %s%s WSDL : %s%s%s',
- $mailMerge->getUsername(),
- PHP_EOL,
- $mailMerge->getPassword(),
- PHP_EOL,
- $mailMerge->getWsdl(),
- PHP_EOL,
- PHP_EOL
- );
- unset($mailMerge);
- // -----------------------------------------------------------------------------
- // Alternatively, you can pass username and password in the constructor.
- $mailMerge = new Zend_Service_LiveDocx_MailMerge(
- array (
- 'username' => DEMOS_ZEND_SERVICE_LIVEDOCX_USERNAME,
- 'password' => DEMOS_ZEND_SERVICE_LIVEDOCX_PASSWORD,
- )
- );
- $mailMerge->getTemplateFormats(); // then call methods as usual
- printf('Username : %s%sPassword : %s%s WSDL : %s%s%s',
- $mailMerge->getUsername(),
- PHP_EOL,
- $mailMerge->getPassword(),
- PHP_EOL,
- $mailMerge->getWsdl(),
- PHP_EOL,
- PHP_EOL
- );
- unset($mailMerge);