public-zend_config.php 893 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/php
  2. <?php
  3. require_once dirname(__FILE__) . '/../../common.php';
  4. system('clear');
  5. print(Demos_Zend_Service_LiveDocx_Helper::wrapLine(
  6. PHP_EOL . 'Using the Public LiveDocx Service with Zend_Config' .
  7. PHP_EOL .
  8. 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.' .
  9. PHP_EOL .
  10. PHP_EOL)
  11. );
  12. $options = new Zend_Config_Ini('credentials.ini');
  13. $phpLiveDocx = new Zend_Service_LiveDocx_MailMerge($options);
  14. $phpLiveDocx->getTemplateFormats(); // then call methods as usual
  15. printf('Username : %s%sPassword : %s%s WSDL : %s%s%s',
  16. $phpLiveDocx->getUsername(),
  17. PHP_EOL,
  18. $phpLiveDocx->getPassword(),
  19. PHP_EOL,
  20. $phpLiveDocx->getWsdl(),
  21. PHP_EOL,
  22. PHP_EOL
  23. );
  24. unset($phpLiveDocx, $options);