Skip to content

Commit

Permalink
Merge pull request #59 from PHPJasper/develop
Browse files Browse the repository at this point in the history
add support for resource option
  • Loading branch information
geekcom authored Aug 8, 2017
2 parents 204f263 + 4c335a1 commit 691756e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Release Notes - PHPJasper - Version 2.2
========================================================
** Improvement: https://github.com/PHPJasper/phpjasper/issues/30
* add support for resource option
________________________________________________________

Release Notes - PHPJasper - Version 2.1
========================================================
** Refactoring
Expand Down
5 changes: 5 additions & 0 deletions src/PHPJasper.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ public function process(string $input, string $output, array $options = [])
foreach ($options['db_connection'] as $key => $value) {
$this->command .= " {$mapDbParams[$key]} {$value}";
}

if ($options['resources']) {
$this->command .= " -r {$options['resources']}";
}
}

return $this;
Expand All @@ -138,6 +142,7 @@ protected function parseProcessOptions(array $options)
$defaultOptions = [
'format' => ['pdf'],
'params' => [],
'resources' => false,
'locale' => false,
'db_connection' => []
];
Expand Down

0 comments on commit 691756e

Please sign in to comment.