Skip to content

Commit c3eaca7

Browse files
committed
Parametrizando o pathExecutable, permitindo executar qualquer versão do JasperReport instalado no servidor
1 parent c11525c commit c3eaca7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PHPJasper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ class PHPJasper
7272
/**
7373
* PHPJasper constructor
7474
*/
75-
public function __construct()
75+
public function __construct(string $pathExecutable = null)
7676
{
7777
$this->executable = 'jasperstarter';
78-
$this->pathExecutable = __DIR__ . '/../bin/jasperstarter/bin';
78+
$this->pathExecutable = $pathExecutable ?? __DIR__ . '/../bin/jasperstarter/bin';
7979
$this->windows = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? true : false;
8080
}
8181

0 commit comments

Comments
 (0)