vendor/endroid/qr-code/src/Writer/BinaryWriter.php line 16

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Endroid\QrCode\Writer;
  4. use Endroid\QrCode\Bacon\MatrixFactory;
  5. use Endroid\QrCode\Label\LabelInterface;
  6. use Endroid\QrCode\Logo\LogoInterface;
  7. use Endroid\QrCode\QrCodeInterface;
  8. use Endroid\QrCode\Writer\Result\BinaryResult;
  9. use Endroid\QrCode\Writer\Result\ResultInterface;
  10. final class BinaryWriter implements WriterInterface
  11. {
  12. public function write(QrCodeInterface $qrCode, LogoInterface $logo = null, LabelInterface $label = null, array $options = []): ResultInterface
  13. {
  14. $matrixFactory = new MatrixFactory();
  15. $matrix = $matrixFactory->create($qrCode);
  16. return new BinaryResult($matrix);
  17. }
  18. }