Skip to content

Commit

Permalink
Add methods for getting output files extension per util
Browse files Browse the repository at this point in the history
  • Loading branch information
ncjoes committed Oct 17, 2016
1 parent e1ec575 commit e8de621
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PopplerPhp/PopplerUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function open($pdfFile)

public function setOutputSubDir($dir_name)
{
$dir_name = H::parseFileName($dir_name);
$dir_name = H::parseDirName($dir_name);

if (!empty($dir_name)) {
$this->output_sub_dir = $dir_name;
Expand Down Expand Up @@ -93,7 +93,7 @@ public function setOption($key, $value)

return $this;
}
throw new PopplerPhpException("Unknown '".get_class($this)."' Option (or Invalid Type): ".$key.'('.gettype($value).')');
throw new PopplerPhpException("Unknown '".get_class($this)."' Option (or Invalid Type): ".$key.'='.$value.' ('.gettype($value).')');
}

public function unsetOption($key)
Expand Down Expand Up @@ -191,7 +191,7 @@ protected function shellExec()
if ($this->require_output_dir) {
$outputDir = $this->getOutputPath();
if (!file_exists($outputDir))
mkdir($outputDir, 0777, true);
@mkdir($outputDir, 0777, true);
}

/**
Expand Down

0 comments on commit e8de621

Please sign in to comment.