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();