mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-28 19:18:44 +00:00
:octocat: use settings container in QRCodeReader
This commit is contained in:
+15
-1
@@ -14,7 +14,7 @@ namespace chillerlan\QRCode;
|
||||
|
||||
use chillerlan\QRCode\Common\EccLevel;
|
||||
|
||||
use function array_values, count, in_array, is_numeric, max, min, sprintf, strtolower;
|
||||
use function array_values, count, extension_loaded, in_array, is_numeric, max, min, sprintf, strtolower;
|
||||
|
||||
/**
|
||||
* The QRCode plug-in settings & setter functionality
|
||||
@@ -219,6 +219,11 @@ trait QROptionsTrait{
|
||||
*/
|
||||
protected ?array $moduleValues = null;
|
||||
|
||||
/**
|
||||
* use Imaagick (if available) when reading QR Codes
|
||||
*/
|
||||
protected bool $useImagickIfAvailable = false;
|
||||
|
||||
/**
|
||||
* clamp min/max version number
|
||||
*/
|
||||
@@ -328,4 +333,13 @@ trait QROptionsTrait{
|
||||
// @todo throw or ignore silently?
|
||||
}
|
||||
|
||||
/**
|
||||
* enables Imagick for the QR Code reader if the extension is available
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
protected function set_useImagickIfAvailable(bool $useImagickIfAvailable):void{
|
||||
$this->useImagickIfAvailable = $useImagickIfAvailable && extension_loaded('imagick');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user