1 | <?php |
||
11 | class Merger |
||
12 | { |
||
13 | /** |
||
14 | * List of pdf sources to merge |
||
15 | * |
||
16 | * @var SourceInterface[] |
||
17 | */ |
||
18 | private $sources = []; |
||
19 | |||
20 | /** |
||
21 | * @var Fpdi Fpdi object |
||
22 | */ |
||
23 | private $fpdi; |
||
24 | |||
25 | /** |
||
26 | * @var string Directory path used for temporary files |
||
27 | */ |
||
28 | private $tempDir; |
||
29 | |||
30 | /** |
||
31 | * Constructor |
||
32 | * |
||
33 | * @param Fpdi $fpdi |
||
34 | */ |
||
35 | public function __construct(Fpdi $fpdi = null) |
||
39 | |||
40 | /** |
||
41 | * Add raw PDF from string |
||
42 | * |
||
43 | * Note that your PDFs are merged in the order that you add them |
||
44 | * |
||
45 | * @param string $content Raw pdf content |
||
46 | * @param Pages $pages Specification of the pages to add |
||
47 | * @return void |
||
48 | */ |
||
49 | public function addRaw($content, Pages $pages = null) |
||
53 | |||
54 | /** |
||
55 | * Add PDF from file |
||
56 | * |
||
57 | * Note that your PDFs are merged in the order that you add them |
||
58 | * |
||
59 | * @param string $filename Name of file to add |
||
60 | * @param Pages $pages Pages to add from file |
||
61 | * @return void |
||
62 | */ |
||
63 | public function addFile($filename, Pages $pages = null) |
||
67 | |||
68 | /** |
||
69 | * Add PDF from file |
||
70 | * |
||
71 | * @deprecated Since version 3.1 |
||
72 | */ |
||
73 | public function addFromFile($fname, Pages $pages = null, $cleanup = null) |
||
78 | |||
79 | /** |
||
80 | * Add files using iterator |
||
81 | * |
||
82 | * @param iterable $iterator Iterator or array with names of files to merge |
||
83 | * @param Pages $pages Optional pages constraint used for every added pdf |
||
84 | * @return void |
||
85 | * @throws Exception If $iterator is not valid |
||
86 | */ |
||
87 | public function addIterator($iterator, Pages $pages = null) |
||
97 | |||
98 | /** |
||
99 | * Add files using a symfony finder |
||
100 | * |
||
101 | * @param Finder $finder |
||
102 | * @param Pages $pages Optional pages constraint used for every added pdf |
||
103 | * @return void |
||
104 | */ |
||
105 | public function addFinder(Finder $finder, Pages $pages = null) |
||
111 | |||
112 | /** |
||
113 | * Merges your provided PDFs and get raw string |
||
114 | * |
||
115 | * A note on the $resetAfterMerge flag. Prior to version 3.1 the internal |
||
116 | * state was always reset after merge. This behaviour is deprecated. In |
||
117 | * version 4 the internal state will never be automatically reset. the |
||
118 | * $resetAfterMerge flag can be used to mimic the comming behaviour |
||
119 | * |
||
120 | * @param boolean $resetAfterMerge Flag if internal state should reset after merge |
||
121 | * @return string |
||
122 | * @throws Exception On failure |
||
123 | */ |
||
124 | public function merge($resetAfterMerge = true) |
||
163 | |||
164 | /** |
||
165 | * Reset internal state |
||
166 | * |
||
167 | * @return void |
||
168 | */ |
||
169 | public function reset() |
||
173 | |||
174 | /** |
||
175 | * Create temporary file and return name |
||
176 | * |
||
177 | * @deprecated Since version 3.1 |
||
178 | */ |
||
179 | public function getTempFname() |
||
188 | |||
189 | /** |
||
190 | * Get directory path for temporary files |
||
191 | * |
||
192 | * @deprecated Since version 3.1 |
||
193 | */ |
||
194 | public function getTempDir() |
||
203 | |||
204 | /** |
||
205 | * Set directory path for temporary files |
||
206 | * |
||
207 | * @deprecated Since version 3.1 |
||
208 | */ |
||
209 | public function setTempDir($dirname) |
||
218 | } |
||
219 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.