forked from zendframework/zendframework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'livedocx-2.0' of http://github.com/jonathanmaron/zf2 in…
…to merges/jonathanmaron-livedocx Conflicts: library/Zend/Application/Resource/Modules.php library/Zend/Loader.php library/Zend/Loader/PluginLoader.php library/Zend/Locale/Format.php library/Zend/Log/Filter/Priority.php library/Zend/Navigation/Page/Mvc.php library/Zend/Session/Configuration/SessionConfiguration.php library/Zend/Tool/Project/Context/Zf/ActionMethod.php library/Zend/View/AbstractView.php
- Loading branch information
Showing
113 changed files
with
7,536 additions
and
525 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
nbproject | ||
demos/Zend/Service/LiveDocx/DemoConfiguration.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 |
---|---|---|
@@ -1,72 +1,68 @@ | ||
INSTALLATION | ||
------------ | ||
|
||
Zend Framework requires no special installation steps. Simply download | ||
the framework, extract it to the folder you would like to keep it in, | ||
and add the library directory to your PHP include_path. To use | ||
components in the extras library, add the extras/library directory to | ||
your PHP include_path as well. | ||
|
||
If you would like to use Zend_Tool, simply add "bin/zf.bat" (for Windows) | ||
or "bin/zf.sh" (for anything else) to your system executable path. | ||
Zend Framework requires no special installation steps. Simply download the framework, | ||
extract it to the folder you would like to keep it in, and add the library directory | ||
to your PHP include_path. To use components in the extras library, add the extras/library | ||
directory to your PHP include_path, as well. | ||
If you would like to use Zend_Tool, simply add bin/zf.bat (for Windows) or | ||
bin/zf.sh (for anything else) to your system executable path. | ||
|
||
SYSTEM REQUIREMENTS | ||
------------------- | ||
|
||
Zend Framework 2 requires PHP 5.3.1 or later. | ||
Zend Framework requires PHP 5.2.4 or later. Please see the system requirements | ||
appendix for more detailed information: | ||
|
||
http://framework.zend.com/manual/en/requirements.html | ||
|
||
DEVELOPMENT VERSIONS | ||
-------------------- | ||
|
||
If you would like to preview enhancements or bug fixes that have not yet | ||
been released, you can obtain the current development version of Zend | ||
Framework using one of the following methods: | ||
If you would like to preview enhancements or bug fixes that have not yet been | ||
released, you can obtain the current development version of Zend Framework using one | ||
of the following methods: | ||
|
||
* Using a Git client. Zend Framework is open source software, and the | ||
Git repository used for its development is publicly available. | ||
Consider using Git to get Zend Framework if you already use Git for | ||
your application development, want to contribute back to the | ||
framework, or need to upgrade your framework version very often. | ||
* Using a Git client. Zend Framework is open source software, and the Git | ||
repository used for its development is publicly available. Consider using Git | ||
to get Zend Framework if you already use Git for your application development, | ||
want to contribute back to the framework, or need to upgrade your framework | ||
version very often. | ||
|
||
Checking out a working copy is necessary if you would like to directly | ||
contribute to Zend Framework; a working copy can be updated any time | ||
using git pull. | ||
Checking out a working copy is necessary if you would like to directly contribute | ||
to Zend Framework; a working copy can be updated any time using git pull. | ||
|
||
To clone the git repository, use the following URL: | ||
|
||
git://git.zendframework.com/zf.git | ||
git://git.zendframework.com/zf.git | ||
|
||
For more information about Git, please see the official website: | ||
|
||
http://www.git-scm.org | ||
http://www.git-scm.org | ||
|
||
CONFIGURING THE INCLUDE PATH | ||
---------------------------- | ||
|
||
Once you have a copy of Zend Framework available, your application will | ||
need to access the framework classes. Though there are several ways to | ||
achieve this, your PHP include_path needs to contain the path to the | ||
Zend Framework classes under the /library directory in this | ||
distribution. You can find out more about the PHP include_path | ||
configuration directive here: | ||
Once you have a copy of Zend Framework available, your application will need to | ||
access the framework classes. Though there are several ways to achieve this, your | ||
PHP include_path needs to contain the path to the Zend Framework classes under the | ||
/library directory in this distribution. You can find out more about the PHP | ||
include_path configuration directive here: | ||
|
||
http://www.php.net/manual/en/ini.core.php#ini.include-path | ||
http://www.php.net/manual/en/ini.core.php#ini.include-path | ||
|
||
Instructions on how to change PHP configuration directives can be found | ||
here: | ||
Instructions on how to change PHP configuration directives can be found here: | ||
|
||
http://www.php.net/manual/en/configuration.changes.php | ||
http://www.php.net/manual/en/configuration.changes.php | ||
|
||
GETTING STARTED | ||
--------------- | ||
|
||
A great place to get up-to-speed quickly is the Zend Framework | ||
QuickStart: | ||
A great place to get up-to-speed quickly is the Zend Framework QuickStart: | ||
|
||
http://framework.zend.com/manual/en/learning.quickstart.html | ||
http://framework.zend.com/manual/en/learning.quickstart.html | ||
|
||
The QuickStart covers some of the most commonly used components of ZF. | ||
Since Zend Framework is designed with a use-at-will architecture and | ||
components are loosely coupled, you can select and use only those | ||
components that are needed for your project. | ||
The QuickStart covers some of the most commonly used components of ZF. Since | ||
Zend Framework is designed with a use-at-will architecture and components are | ||
loosely coupled, you can select and use only those components that are needed for | ||
your project. |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions
39
demos/Zend/Service/LiveDocx/MailMerge/conference-pass/generate-document.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,39 @@ | ||
<?php | ||
|
||
require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'Bootstrap.php'; | ||
|
||
|
||
use Zend\Date\Date; | ||
use Zend\Service\LiveDocx\MailMerge; | ||
|
||
$mailMerge = new MailMerge(); | ||
|
||
$mailMerge->setUsername(DEMOS_ZEND_SERVICE_LIVEDOCX_USERNAME) | ||
->setPassword(DEMOS_ZEND_SERVICE_LIVEDOCX_PASSWORD); | ||
|
||
/** | ||
* Image Source: | ||
* iStock_000003413016Medium_business-man-with-hands-up.jpg | ||
*/ | ||
$photoFilename = 'dailemaitre.jpg'; | ||
|
||
if (!$mailMerge->imageExists($photoFilename)) { | ||
$mailMerge->uploadImage($photoFilename); | ||
} | ||
|
||
$mailMerge->setLocalTemplate('template.docx'); | ||
|
||
$mailMerge->assign('name', 'Daï Lemaitre') | ||
->assign('company', 'Megasoft Co-operation') | ||
->assign('date', Date::now()->toString(Date::DATE_LONG)) | ||
->assign('image:photo', $photoFilename); | ||
|
||
$mailMerge->createDocument(); | ||
|
||
$document = $mailMerge->retrieveDocument('pdf'); | ||
|
||
file_put_contents('document.pdf', $document); | ||
|
||
$mailMerge->deleteImage($photoFilename); | ||
|
||
unset($mailMerge); |
Binary file not shown.
30 changes: 30 additions & 0 deletions
30
demos/Zend/Service/LiveDocx/MailMerge/images/delete-all.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,30 @@ | ||
<?php | ||
|
||
require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'Bootstrap.php'; | ||
|
||
|
||
use Zend\Service\LiveDocx\Helper; | ||
use Zend\Service\LiveDocx\MailMerge; | ||
|
||
Helper::printLine( | ||
PHP_EOL . 'Deleting All Remotely Stored Images' . | ||
PHP_EOL . | ||
PHP_EOL | ||
); | ||
|
||
$mailMerge = new MailMerge(); | ||
|
||
$mailMerge->setUsername(DEMOS_ZEND_SERVICE_LIVEDOCX_USERNAME) | ||
->setPassword(DEMOS_ZEND_SERVICE_LIVEDOCX_PASSWORD); | ||
|
||
$counter = 1; | ||
foreach ($mailMerge->listImages() as $result) { | ||
printf('%d) %s', $counter, $result['filename']); | ||
$mailMerge->deleteImage($result['filename']); | ||
print(' - DELETED.' . PHP_EOL); | ||
$counter++; | ||
} | ||
|
||
print(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'Bootstrap.php'; | ||
|
||
|
||
use Zend\Service\LiveDocx\Helper; | ||
use Zend\Service\LiveDocx\MailMerge; | ||
|
||
Helper::printLine( | ||
PHP_EOL . 'Downloading Remotely Stored Images' . | ||
PHP_EOL . | ||
PHP_EOL | ||
); | ||
|
||
$mailMerge = new MailMerge(); | ||
|
||
$mailMerge->setUsername(DEMOS_ZEND_SERVICE_LIVEDOCX_USERNAME) | ||
->setPassword(DEMOS_ZEND_SERVICE_LIVEDOCX_PASSWORD); | ||
|
||
$counter = 1; | ||
foreach ($mailMerge->listImages() as $result) { | ||
printf('%d) %s', $counter, $result['filename']); | ||
$image = $mailMerge->downloadImage($result['filename']); | ||
file_put_contents('downloaded-' . $result['filename'], $image); | ||
print(' - DOWNLOADED.' . PHP_EOL); | ||
$counter++; | ||
} | ||
|
||
print(PHP_EOL); | ||
|
||
unset($mailMerge); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions
30
demos/Zend/Service/LiveDocx/MailMerge/images/image-exists.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,30 @@ | ||
<?php | ||
|
||
require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'Bootstrap.php'; | ||
|
||
|
||
use Zend\Service\LiveDocx\Helper; | ||
use Zend\Service\LiveDocx\MailMerge; | ||
|
||
Helper::printLine( | ||
PHP_EOL . 'Checking For Remotely Stored Images' . | ||
PHP_EOL . | ||
PHP_EOL | ||
); | ||
|
||
$mailMerge = new MailMerge(); | ||
|
||
$mailMerge->setUsername(DEMOS_ZEND_SERVICE_LIVEDOCX_USERNAME) | ||
->setPassword(DEMOS_ZEND_SERVICE_LIVEDOCX_PASSWORD); | ||
|
||
print('Checking whether an image is available... '); | ||
if (true === $mailMerge->imageExists('image-01.png')) { | ||
print('EXISTS. '); | ||
} else { | ||
print('DOES NOT EXIST. '); | ||
} | ||
print('DONE' . PHP_EOL); | ||
|
||
print(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'Bootstrap.php'; | ||
|
||
|
||
use Zend\Service\LiveDocx\Helper; | ||
use Zend\Service\LiveDocx\MailMerge; | ||
|
||
Helper::printLine( | ||
PHP_EOL . 'Remotely Stored Images' . | ||
PHP_EOL . | ||
PHP_EOL . 'The following images are currently stored on the LiveDocx server:' . | ||
PHP_EOL . | ||
PHP_EOL | ||
); | ||
|
||
$mailMerge = new MailMerge(); | ||
|
||
$mailMerge->setUsername(DEMOS_ZEND_SERVICE_LIVEDOCX_USERNAME) | ||
->setPassword(DEMOS_ZEND_SERVICE_LIVEDOCX_PASSWORD); | ||
|
||
print(Helper::listDecorator($mailMerge->listImages())); | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'Bootstrap.php'; | ||
|
||
|
||
use Zend\Service\LiveDocx\Helper; | ||
use Zend\Service\LiveDocx\MailMerge; | ||
|
||
Helper::printLine( | ||
PHP_EOL . 'Uploading Locally Stored Images to Server' . | ||
PHP_EOL . | ||
PHP_EOL | ||
); | ||
|
||
$mailMerge = new MailMerge(); | ||
|
||
$mailMerge->setUsername(DEMOS_ZEND_SERVICE_LIVEDOCX_USERNAME) | ||
->setPassword(DEMOS_ZEND_SERVICE_LIVEDOCX_PASSWORD); | ||
|
||
print('Uploading image... '); | ||
$mailMerge->uploadImage('image-01.png'); | ||
print('DONE.' . PHP_EOL); | ||
|
||
print('Uploading image... '); | ||
$mailMerge->uploadImage('image-02.png'); | ||
print('DONE.' . PHP_EOL); | ||
|
||
print(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
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
Oops, something went wrong.