Skip to content

Commit 515d91d

Browse files
Refactored namespace Zend\Pdf -> ZendPdf
Added various files: license, readme, test assets
1 parent 371acea commit 515d91d

File tree

172 files changed

+1532
-1276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+1532
-1276
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor/

LICENSE.txt

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright (c) 2005-2012, Zend Technologies USA, Inc.
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification,
5+
are permitted provided that the following conditions are met:
6+
7+
* Redistributions of source code must retain the above copyright notice,
8+
this list of conditions and the following disclaimer.
9+
10+
* Redistributions in binary form must reproduce the above copyright notice,
11+
this list of conditions and the following disclaimer in the documentation
12+
and/or other materials provided with the distribution.
13+
14+
* Neither the name of Zend Technologies USA, Inc. nor the names of its
15+
contributors may be used to endorse or promote products derived from this
16+
software without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
22+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ZendPdf component
2+
3+
You can install using:
4+
5+
```
6+
curl -s http://getcomposer.org/installer | php
7+
php composer.phar install
8+
```
9+
10+
At that point, follow the instructions in the documentation folder for actual
11+
usage of the component. (Documentation is forthcoming.)

composer.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "zendframework/zendpdf",
3+
"description": "Zend Pdf Component",
4+
"type": "library",
5+
"license": "BSD-3-Clause",
6+
"keywords": [
7+
"zf2",
8+
"pdf"
9+
],
10+
"homepage": "http://packages.zendframework.com/",
11+
"autoload": {
12+
"psr-0": {
13+
"ZendPdf": "library/"
14+
}
15+
},
16+
"repositories": [
17+
{
18+
"type": "composer",
19+
"url": "http://packages.zendframework.com/"
20+
}
21+
],
22+
"require": {
23+
"php": ">=5.3.3",
24+
"zendframework/zend-stdlib": "self.version"
25+
}
26+
}

library/ZendPdf/Action/AbstractAction.php

+20-20
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
use Countable;
1414
use RecursiveIterator;
15-
use Zend\Pdf;
16-
use Zend\Pdf\Exception;
17-
use Zend\Pdf\InternalType;
18-
use Zend\Pdf\ObjectFactory;
15+
use ZendPdf as Pdf;
16+
use ZendPdf\Exception;
17+
use ZendPdf\InternalType;
18+
use ZendPdf\ObjectFactory;
1919

2020
/**
2121
* Abstract PDF action representation class
@@ -30,34 +30,34 @@ abstract class AbstractAction extends Pdf\InternalStructure\NavigationTarget imp
3030
/**
3131
* Action dictionary
3232
*
33-
* @var \Zend\Pdf\InternalType\DictionaryObject
34-
* | \Zend\Pdf\InternalType\IndirectObject
35-
* | \Zend\Pdf\InternalType\IndirectObjectReference
33+
* @var \ZendPdf\InternalType\DictionaryObject
34+
* | \ZendPdf\InternalType\IndirectObject
35+
* | \ZendPdf\InternalType\IndirectObjectReference
3636
*/
3737
protected $_actionDictionary;
3838

3939

4040
/**
4141
* An original list of chained actions
4242
*
43-
* @var array Array of \Zend\Pdf\Action\AbstractAction objects
43+
* @var array Array of \ZendPdf\Action\AbstractAction objects
4444
*/
4545
protected $_originalNextList;
4646

4747
/**
4848
* A list of next actions in actions tree (used for actions chaining)
4949
*
50-
* @var array Array of \Zend\Pdf\Action\AbstractAction objects
50+
* @var array Array of \ZendPdf\Action\AbstractAction objects
5151
*/
5252
public $next = array();
5353

5454
/**
5555
* Object constructor
5656
*
57-
* @param \Zend\Pdf\InternalType\DictionaryObject $dictionary
57+
* @param \ZendPdf\InternalType\DictionaryObject $dictionary
5858
* @param SplObjectStorage $processedActions list of already processed action dictionaries,
5959
* used to avoid cyclic references
60-
* @throws \Zend\Pdf\Exception\ExceptionInterface
60+
* @throws \ZendPdf\Exception\ExceptionInterface
6161
*/
6262
public function __construct(InternalType\AbstractTypeObject $dictionary, \SplObjectStorage $processedActions)
6363
{
@@ -94,10 +94,10 @@ public function __construct(InternalType\AbstractTypeObject $dictionary, \SplObj
9494
* Load PDF action object using specified dictionary
9595
*
9696
* @internal
97-
* @param \Zend\Pdf\InternalType\AbstractTypeObject $dictionary (It's actually Dictionary or Dictionary Object or Reference to a Dictionary Object)
97+
* @param \ZendPdf\InternalType\AbstractTypeObject $dictionary (It's actually Dictionary or Dictionary Object or Reference to a Dictionary Object)
9898
* @param SplObjectStorage $processedActions list of already processed action dictionaries, used to avoid cyclic references
99-
* @return \Zend\Pdf\Action\AbstractAction
100-
* @throws \Zend\Pdf\Exception\ExceptionInterface
99+
* @return \ZendPdf\Action\AbstractAction
100+
* @throws \ZendPdf\Exception\ExceptionInterface
101101
*/
102102
public static function load(InternalType\AbstractTypeObject $dictionary, \SplObjectStorage $processedActions = null)
103103
{
@@ -180,7 +180,7 @@ public static function load(InternalType\AbstractTypeObject $dictionary, \SplObj
180180
* Get resource
181181
*
182182
* @internal
183-
* @return \Zend\Pdf\InternalType\AbstractTypeObject
183+
* @return \ZendPdf\InternalType\AbstractTypeObject
184184
*/
185185
public function getResource()
186186
{
@@ -193,10 +193,10 @@ public function getResource()
193193
* Returns dictionary indirect object or reference
194194
*
195195
* @internal
196-
* @param \Zend\Pdf\ObjectFactory $factory Object factory for newly created indirect objects
196+
* @param \ZendPdf\ObjectFactory $factory Object factory for newly created indirect objects
197197
* @param SplObjectStorage $processedActions list of already processed actions
198198
* (used to prevent infinity loop caused by cyclic references)
199-
* @return \Zend\Pdf\InternalType\IndirectObject|\Zend\Pdf\InternalType\IndirectObjectReference
199+
* @return \ZendPdf\InternalType\IndirectObject|\ZendPdf\InternalType\IndirectObjectReference
200200
*/
201201
public function dumpAction(ObjectFactory $factory, \SplObjectStorage $processedActions = null)
202202
{
@@ -268,7 +268,7 @@ public function dumpAction(ObjectFactory $factory, \SplObjectStorage $processedA
268268
/**
269269
* Returns current child action.
270270
*
271-
* @return \Zend\Pdf\Action\AbstractAction
271+
* @return \ZendPdf\Action\AbstractAction
272272
*/
273273
public function current()
274274
{
@@ -314,7 +314,7 @@ public function valid()
314314
/**
315315
* Returns the child action.
316316
*
317-
* @return \Zend\Pdf\Action\AbstractAction|null
317+
* @return \ZendPdf\Action\AbstractAction|null
318318
*/
319319
public function getChildren()
320320
{

library/ZendPdf/Action/GoTo3DView.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
/**
1414
* PDF 'Set the current view of a 3D annotation' action

library/ZendPdf/Action/GoToAction.php

+14-14
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

13-
use Zend\Pdf;
14-
use Zend\Pdf\Destination;
15-
use Zend\Pdf\Exception;
16-
use Zend\Pdf\InternalType;
13+
use ZendPdf as Pdf;
14+
use ZendPdf\Destination;
15+
use ZendPdf\Exception;
16+
use ZendPdf\InternalType;
1717

1818
/**
1919
* PDF 'Go to' action
@@ -26,15 +26,15 @@ class GoToAction extends AbstractAction
2626
/**
2727
* GoTo Action destination
2828
*
29-
* @var \Zend\Pdf\Destination\AbstractDestination
29+
* @var \ZendPdf\Destination\AbstractDestination
3030
*/
3131
protected $_destination;
3232

3333

3434
/**
3535
* Object constructor
3636
*
37-
* @param \Zend\Pdf\InternalType\DictionaryObject $dictionary
37+
* @param \ZendPdf\InternalType\DictionaryObject $dictionary
3838
* @param SplObjectStorage $processedActions list of already processed action dictionaries,
3939
* used to avoid cyclic references
4040
*/
@@ -46,10 +46,10 @@ public function __construct(InternalType\AbstractTypeObject $dictionary, \SplObj
4646
}
4747

4848
/**
49-
* Create new \Zend\Pdf\Action\GoToAction object using specified destination
49+
* Create new \ZendPdf\Action\GoToAction object using specified destination
5050
*
51-
* @param \Zend\Pdf\Destination\AbstractDestination|string $destination
52-
* @return \Zend\Pdf\Action\GoToAction
51+
* @param \ZendPdf\Destination\AbstractDestination|string $destination
52+
* @return \ZendPdf\Action\GoToAction
5353
*/
5454
public static function create($destination)
5555
{
@@ -58,7 +58,7 @@ public static function create($destination)
5858
}
5959

6060
if (!$destination instanceof Destination\AbstractDestination) {
61-
throw new Exception\InvalidArgumentException('$destination parameter must be a \Zend\Pdf\Destination object or string.');
61+
throw new Exception\InvalidArgumentException('$destination parameter must be a \ZendPdf\Destination object or string.');
6262
}
6363

6464
$dictionary = new InternalType\DictionaryObject();
@@ -73,8 +73,8 @@ public static function create($destination)
7373
/**
7474
* Set goto action destination
7575
*
76-
* @param \Zend\Pdf\Destination\AbstractDestination|string $destination
77-
* @return \Zend\Pdf\Action\GoToAction
76+
* @param \ZendPdf\Destination\AbstractDestination|string $destination
77+
* @return \ZendPdf\Action\GoToAction
7878
*/
7979
public function setDestination(Destination\AbstractDestination $destination)
8080
{
@@ -89,7 +89,7 @@ public function setDestination(Destination\AbstractDestination $destination)
8989
/**
9090
* Get goto action destination
9191
*
92-
* @return \Zend\Pdf\Destination\AbstractDestination
92+
* @return \ZendPdf\Destination\AbstractDestination
9393
*/
9494
public function getDestination()
9595
{

library/ZendPdf/Action/GoToE.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
/**
1414
* PDF 'Go to a destination in an embedded file' action

library/ZendPdf/Action/GoToR.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
/**
1414
* PDF 'Go to a destination in another document' action

library/ZendPdf/Action/Hide.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
/**
1414
* PDF 'Set an annotation’s Hidden flag' action

library/ZendPdf/Action/ImportData.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
/**
1414
* PDF 'Import field values from a file' action

library/ZendPdf/Action/JavaScript.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
/**
1414
* PDF 'Execute a JavaScript script' action

library/ZendPdf/Action/Launch.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
/**
1414
* PDF 'Launch an application, usually to open a file' action

library/ZendPdf/Action/Movie.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
/**
1414
* PDF 'Play a movie' action

library/ZendPdf/Action/Named.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
/**
1414
* PDF 'Execute an action predefined by the viewer application' action

library/ZendPdf/Action/Rendition.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
/**
1414
* PDF 'Controls the playing of multimedia content' action

library/ZendPdf/Action/ResetForm.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
/**
1414
* PDF 'Set fields to their default values' action

library/ZendPdf/Action/SetOCGState.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
/**
1414
* PDF 'Set the states of optional content groups' action

library/ZendPdf/Action/Sound.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
/**
1414
* PDF 'Play a sound' action representation class

library/ZendPdf/Action/SubmitForm.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
/**
1414
* PDF 'Send data to a uniform resource locator' action

library/ZendPdf/Action/Thread.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Pdf
99
*/
1010

11-
namespace Zend\Pdf\Action;
11+
namespace ZendPdf\Action;
1212

1313
/**
1414
* PDF 'Begin reading an article thread' action

0 commit comments

Comments
 (0)