src/Output/QRImage.php 1 location
|
@@ 79-81 (lines=3) @@
|
76 |
|
*/ |
77 |
|
public function dump():string{ |
78 |
|
|
79 |
|
if($this->options->cachefile !== null && !is_writable(dirname($this->options->cachefile))){ |
80 |
|
throw new QRCodeOutputException('Could not write data to cache file: '.$this->options->cachefile); |
81 |
|
} |
82 |
|
|
83 |
|
$this->setImage(); |
84 |
|
|
src/Output/QROutputAbstract.php 1 location
|
@@ 78-80 (lines=3) @@
|
75 |
|
*/ |
76 |
|
protected function saveToFile(string $data) { |
77 |
|
|
78 |
|
if(!is_writable(dirname($this->options->cachefile))){ |
79 |
|
throw new QRCodeOutputException('Could not write data to cache file: '.$this->options->cachefile); |
80 |
|
} |
81 |
|
|
82 |
|
return file_put_contents($this->options->cachefile, $data); |
83 |
|
} |