From f13300c3047759f34c19061e26337bb74f4f600b Mon Sep 17 00:00:00 2001 From: smiley Date: Wed, 15 Mar 2023 19:55:59 +0100 Subject: [PATCH] :shower: --- examples/custom_output.php | 2 ++ src/Output/QROutputAbstract.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/custom_output.php b/examples/custom_output.php index e9788afc4..d0a78c21c 100644 --- a/examples/custom_output.php +++ b/examples/custom_output.php @@ -71,6 +71,8 @@ class MyCustomOutput extends QROutputAbstract{ $data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s'; // invoke the QROutputInterface manually +// please note that an QROutputInterface invoked this way might become unusable after calling dump(). +// the clean way would be to extend the QRCode class to ensure a new QROutputInterface instance on each call to render(). $options = new QROptions([ 'version' => 5, 'eccLevel' => EccLevel::L, diff --git a/src/Output/QROutputAbstract.php b/src/Output/QROutputAbstract.php index d8c75cc81..d862df010 100644 --- a/src/Output/QROutputAbstract.php +++ b/src/Output/QROutputAbstract.php @@ -58,8 +58,8 @@ abstract class QROutputAbstract implements QROutputInterface{ * QROutputAbstract constructor. */ public function __construct(SettingsContainerInterface $options, QRMatrix $matrix){ - $this->options = $options; - $this->matrix = $matrix; + $this->options = $options; + $this->matrix = $matrix; $this->setMatrixDimensions(); $this->setModuleValues();