MyCustomOutput.php 718 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Class MyCustomOutput
  4. *
  5. * @filesource MyCustomOutput.php
  6. * @created 24.12.2017
  7. * @package chillerlan\QRCodeExamples
  8. * @author Smiley <smiley@chillerlan.net>
  9. * @copyright 2017 Smiley
  10. * @license MIT
  11. */
  12. use chillerlan\QRCode\Output\QROutputAbstract;
  13. class MyCustomOutput extends QROutputAbstract{
  14. protected function setModuleValues():void{
  15. // TODO: Implement setModuleValues() method.
  16. }
  17. public function dump(string $file = null){
  18. $output = '';
  19. for($row = 0; $row < $this->moduleCount; $row++){
  20. for($col = 0; $col < $this->moduleCount; $col++){
  21. $output .= (int)$this->matrix->check($col, $row);
  22. }
  23. $output .= \PHP_EOL;
  24. }
  25. return $output;
  26. }
  27. }