:octocat: +QRCode::setOptions()

This commit is contained in:
smiley
2023-03-02 23:27:00 +01:00
parent c474cc704e
commit d98b56b55e
2 changed files with 13 additions and 5 deletions
+10 -2
View File
@@ -183,12 +183,20 @@ class QRCode{
* Sets the options instance
*/
public function __construct(SettingsContainerInterface $options = null){
$this->options = $options ?? new QROptions;
$this->setOptions($options ?? new QROptions);
}
/**
* Sets an options instance
*/
public function setOptions(SettingsContainerInterface $options):self{
$this->options = $options;
// I hate this less
if($this->options->readerUseImagickIfAvailable){
$this->luminanceSourceFQN = IMagickLuminanceSource::class;
}
return $this;
}
/**