Skip to content

Commit 84720d0

Browse files
authored
Merge pull request #224 from chaos0815/master
Make $start argument nullable and optional.
2 parents 0a1f32f + f1cfdda commit 84720d0

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/Pdf.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,16 @@ public function addFile($name, $handle = null, $password = null)
153153
* ->cat('end', 5, 'B') // pages 5 to end of file B in reverse order
154154
* ->cat(null, null, 'B', 'east') // All pages from file B rotated by 90 degree
155155
* ->saveAs('out.pdf');
156+
* or
157+
* $files = ['file1.pdf', 'file2.pdf', 'file3.pdf'];
158+
* $pdf = new Pdf($files);
159+
* $pdf->cat() // all files, all pages
160+
* ->saveAs('out.pdf');
156161
*
157-
* @param int|string|array $start the start page number or an array of page
162+
* @param int|string|array|null $start the start page number or an array of page
158163
* numbers. If an array, the other arguments will be ignored. $start can
159-
* also be bigger than $end for pages in reverse order.
164+
* also be bigger than $end for pages in reverse order. If $start is null all
165+
* pages of all files will be added.
160166
* @param int|string|null $end the end page number or null for single page
161167
* (or list if $start is an array)
162168
* @param string|null $handle the handle of the file to use. Can be null if
@@ -166,7 +172,7 @@ public function addFile($name, $handle = null, $password = null)
166172
* @param string $rotation the rotation to apply to the pages.
167173
* @return Pdf the pdf instance for method chaining
168174
*/
169-
public function cat($start, $end = null, $handle = null, $qualifier = null, $rotation = null)
175+
public function cat($start = null, $end = null, $handle = null, $qualifier = null, $rotation = null)
170176
{
171177
$this->getCommand()
172178
->setOperation('cat')

0 commit comments

Comments
 (0)