public-zend_config.php 866 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. require_once dirname(__FILE__) . '/../../common.php';
  3. system('clear');
  4. print(Demos_Zend_Service_LiveDocx_Helper::wrapLine(
  5. PHP_EOL . 'Using the Public LiveDocx Service with Zend_Config' .
  6. PHP_EOL .
  7. PHP_EOL . 'This sample application illustrates how to use Zend_Service_LiveDocx_MailMerge with a Zend_Config object. This is useful, for example, to store connection credentials in an external ini file.' .
  8. PHP_EOL .
  9. PHP_EOL)
  10. );
  11. $options = new Zend_Config_Ini('credentials.ini');
  12. $mailMerge = new Zend_Service_LiveDocx_MailMerge($options);
  13. $mailMerge->getTemplateFormats(); // then call methods as usual
  14. printf('Username : %s%sPassword : %s%s WSDL : %s%s%s',
  15. $mailMerge->getUsername(),
  16. PHP_EOL,
  17. $mailMerge->getPassword(),
  18. PHP_EOL,
  19. $mailMerge->getWsdl(),
  20. PHP_EOL,
  21. PHP_EOL
  22. );
  23. unset($mailMerge, $options);