Skip to content

Commit

Permalink
Update syntax for 5.3+
Browse files Browse the repository at this point in the history
  • Loading branch information
hidakatsuya committed Aug 7, 2015
1 parent 5b64ead commit 71b078c
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions examples/hello_world/hello_world.php
Expand Up @@ -19,20 +19,15 @@
$page->setItemValue('world', 'World');
$page->setItemValue('sekai', '世界');

$report->addPage(function ($new_page) {
$new_page('world')->setValue('World')->setStyle('color', 'blue');
$new_page('sekai')->setValue('世界');
});

$page = $report->addPage();
$page->setItemValues([
$page->setItemValues(array(
'world' => 'World',
'sekai' => '世界'
]);
));

$report->addPage()->setItemValues([
$report->addPage()->setItemValues(array(
'world' => 'World',
'sekai' => '世界'
]);
));

$report->generate(__DIR__ . '/hello_world.pdf');

0 comments on commit 71b078c

Please sign in to comment.