From e7c9fa5547b7335f1dc3cf1157adf7e2db0bacd9 Mon Sep 17 00:00:00 2001 From: Jamie Hannaford Date: Wed, 24 Apr 2013 16:36:15 +0200 Subject: [PATCH] Added an example to help out users to set variables Shows users how to specify view variables by using (extended) method from ZF2's ViewModel. --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c980651..4419af0 100644 --- a/README.md +++ b/README.md @@ -54,11 +54,16 @@ class ReportController extends AbstractActionController $pdf->setOption('filename', 'monthly-report'), // Triggers PDF download, automatically appends ".pdf" $pdf->setOption('paperSize', 'a4'); // Defaults to "8x11" $pdf->setOption('paperOrientation', 'landscape'); // Defaults to "portrait" - + + // To set view variables + $pdf->setVariables(array( + 'message' => 'Hello' + )); + return $pdf; } } ``` ## To-do - - Add command line support. \ No newline at end of file + - Add command line support.