smiley 2 years ago
parent
commit
f13300c304
2 changed files with 4 additions and 2 deletions
  1. 2 0
      examples/custom_output.php
  2. 2 2
      src/Output/QROutputAbstract.php

+ 2 - 0
examples/custom_output.php

@@ -71,6 +71,8 @@ class MyCustomOutput extends QROutputAbstract{
 $data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s';
 $data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s';
 
 
 // invoke the QROutputInterface manually
 // 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([
 $options = new QROptions([
 	'version'  => 5,
 	'version'  => 5,
 	'eccLevel' => EccLevel::L,
 	'eccLevel' => EccLevel::L,

+ 2 - 2
src/Output/QROutputAbstract.php

@@ -58,8 +58,8 @@ abstract class QROutputAbstract implements QROutputInterface{
 	 * QROutputAbstract constructor.
 	 * QROutputAbstract constructor.
 	 */
 	 */
 	public function __construct(SettingsContainerInterface $options, QRMatrix $matrix){
 	public function __construct(SettingsContainerInterface $options, QRMatrix $matrix){
-		$this->options     = $options;
-		$this->matrix      = $matrix;
+		$this->options = $options;
+		$this->matrix  = $matrix;
 
 
 		$this->setMatrixDimensions();
 		$this->setMatrixDimensions();
 		$this->setModuleValues();
 		$this->setModuleValues();