:octocat: examples cleanup

This commit is contained in:
smiley
2022-07-09 18:10:23 +02:00
parent 9d309e2ff8
commit e971678ac5
17 changed files with 382 additions and 420 deletions
+3 -10
View File
@@ -6,17 +6,12 @@
* @license MIT
*/
namespace chillerlan\QRCodeExamples;
use chillerlan\QRCode\{QRCode, QROptions};
use chillerlan\QRCode\Data\QRMatrix;
use chillerlan\QRCode\Common\EccLevel;
use Throwable;
require_once __DIR__.'/../vendor/autoload.php';
$data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s';
$options = new QROptions([
'version' => 7,
'outputType' => QRCode::OUTPUT_IMAGE_PNG,
@@ -58,8 +53,9 @@ $options = new QROptions([
],
]);
try{
$im = (new QRCode($options))->render($data);
$im = (new QRCode($options))->render('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
}
catch(Throwable $e){
exit($e->getMessage());
@@ -69,7 +65,4 @@ header('Content-type: image/png');
echo $im;
exit;