Esempio n. 1
0
<?php

include_once "../vendor/autoload.php";
use Arcanedev\QrCode\QrCode;
$qrCode = new QrCode();
$qrCode->setText("I would love to change the world, but they won't give me the source code")->setSize(200);
$qrCode->render();
Esempio n. 2
0
<?php

include_once "../vendor/autoload.php";
use Arcanedev\QrCode\QrCode;
$qrCode = new QrCode();
$qrCode->setText("I would love to change the world, but they won't give me the source code");
$qrCode->setSize(200);
echo $qrCode->image('ARCANEDEV', ['style' => 'width: 150px;']);
Esempio n. 3
0
 /**
  * QRcode a owner entity.
  *
  * @Route("/", name="owner_qrcode")
  */
 public function generateQRCode()
 {
     $entity = new Owner();
     $qrCode = new QrCode();
     $qrCode->setText("I would love to change the world, but they won't give me the source code");
     $qrCode->setSize(200);
     echo $qrCode->image("image alt", ['class' => 'qr-code-img']);
 }
Esempio n. 4
0
<?php

include_once "../vendor/autoload.php";
// If you specify a full path (URL) in your filename, check if the folder is already exists
$filename = 'qr-code-name.png';
use Arcanedev\QrCode\QrCode;
$qrCode = new QrCode();
$qrCode->setText("I would love to change the world, but they won't give me the source code.");
$qrCode->setSize(200);
$qrCode->save($filename);
// This is a helper to echo out an image, you can use your own function/HTML tag
echo img_tag($filename, 'Your Alt Image | Optional', ['class' => 'your-css-class optional']);