moved API constants to QRCode

This commit is contained in:
smiley
2015-12-09 23:41:36 +01:00
parent 99a2b88936
commit b589215f97
7 changed files with 56 additions and 52 deletions
+4 -6
View File
@@ -5,7 +5,6 @@ require_once '../vendor/autoload.php';
use chillerlan\QRCode\Output\QRString;
use chillerlan\QRCode\Output\QRStringOptions;
use chillerlan\QRCode\QRCode;
use chillerlan\QRCode\QRConst;
use chillerlan\QRCode\QROptions;
//---------------------------------------------------------
@@ -44,13 +43,12 @@ echo '<style>
</style>';
$qrStringOptions = new QRStringOptions;
$qrStringOptions->type = QRConst::OUTPUT_STRING_HTML;
$qrStringOptions->type = QRCode::OUTPUT_STRING_HTML;
$qrOptions = new QROptions;
$qrOptions->typeNumber = QRConst::TYPE_05;
$qrOptions->errorCorrectLevel = QRConst::ERROR_CORRECT_LEVEL_M;
$qrOptions->output = new QRString($qrStringOptions);
$qrOptions->typeNumber = QRCode::TYPE_05;
$qrOptions->errorCorrectLevel = QRCode::ERROR_CORRECT_LEVEL_M;
$qr = new QRCode('skype://callto:echo123', $qrOptions);
$qr = new QRCode('skype://callto:echo123', new QRString($qrStringOptions), $qrOptions);
echo '<div class="qrcode">'.$qr->output().'</div>';