Skip to content

Commit a584099

Browse files
committed
makes $start argument nullable and optional.
adds example for usage
1 parent 0a1f32f commit a584099

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Pdf.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,13 @@ 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 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
159164
* also be bigger than $end for pages in reverse order.
160165
* @param int|string|null $end the end page number or null for single page
@@ -166,7 +171,7 @@ public function addFile($name, $handle = null, $password = null)
166171
* @param string $rotation the rotation to apply to the pages.
167172
* @return Pdf the pdf instance for method chaining
168173
*/
169-
public function cat($start, $end = null, $handle = null, $qualifier = null, $rotation = null)
174+
public function cat($start = null, $end = null, $handle = null, $qualifier = null, $rotation = null)
170175
{
171176
$this->getCommand()
172177
->setOperation('cat')

0 commit comments

Comments
 (0)