forked from zendframework/zendframework
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote branch 'jonathanmaron/zend-service-livedocx-1.3' into jm
- Loading branch information
Showing
10 changed files
with
143 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
demos/Zend/Service/LiveDocx/MailMerge/pdf-security/show-document-access-options.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'Bootstrap.php'; | ||
|
||
|
||
use Zend\Service\LiveDocx\MailMerge; | ||
use Zend\Service\LiveDocx\Helper; | ||
|
||
Helper::printLine( | ||
PHP_EOL . 'Document Access Options' . | ||
PHP_EOL . | ||
PHP_EOL . 'Documents can be protected using one or more document access option:' . | ||
PHP_EOL . | ||
PHP_EOL | ||
); | ||
|
||
$mailMerge = new MailMerge(); | ||
|
||
// Set WSDL of your *premium* service server | ||
$mailMerge->setWSDL(DEMOS_ZEND_SERVICE_LIVEDOCX_PREMIUM_WSDL); | ||
|
||
// Set username and password of your *premium* service server | ||
$mailMerge->setUsername(DEMOS_ZEND_SERVICE_LIVEDOCX_PREMIUM_USERNAME) | ||
->setPassword(DEMOS_ZEND_SERVICE_LIVEDOCX_PREMIUM_PASSWORD); | ||
|
||
Helper::printLine( | ||
implode(', ', $mailMerge->getDocumentAccessOptions()) . '.' . | ||
PHP_EOL . | ||
PHP_EOL | ||
); | ||
|
||
unset($mailMerge); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
set_time_limit(0); | ||
|
||
require_once __DIR__ . DIRECTORY_SEPARATOR . 'Bootstrap.php'; | ||
|
||
|
||
/** | ||
* Run all demonstration applications | ||
* | ||
* This script recursively runs all demonstration applications, which ship with | ||
* the Zend Framework LiveDocx component. The demonstration applications | ||
* do not necessarily output anything to stdout. Those that do not, generate a | ||
* file in the same directory as the PHP script. | ||
*/ | ||
|
||
exec('which php', $php); | ||
|
||
if (!isset($php[0])) { | ||
exit('Cannot find PHP exec on your system.'); | ||
} | ||
|
||
$php = $php[0]; | ||
|
||
$path = __DIR__ . DIRECTORY_SEPARATOR . 'MailMerge'; | ||
|
||
$it = new \RecursiveDirectoryIterator($path); | ||
foreach (new \RecursiveIteratorIterator($it) as $file) { | ||
if ('php' === substr($file->getFilename(), -3)) { | ||
$cmd = sprintf('cd %s && %s %s', dirname($file->getPathname()), | ||
$php, $file->getFilename()); | ||
print($cmd . PHP_EOL); | ||
passthru($cmd); | ||
} | ||
} | ||
|
||
chdir(__DIR__); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.