MyCustomOutput.php 684 B

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