PHP code example of bauer-kirch / cwa-event-registration-url

1. Go to this page and download the library: Download bauer-kirch/cwa-event-registration-url library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bauer-kirch / cwa-event-registration-url example snippets


use BauerKirch\CoronaWarnAppEventRegistration\QRCodePayloadReader;

$url = 'https://e.coronawarn.app/?v=1#CAESR...';
$reader = new QRCodePayloadReader();
$result = $reader->readUrl($url);
echo $result->getDescription();

use BauerKirch\CoronaWarnAppEventRegistration\LocationType;
use BauerKirch\CoronaWarnAppEventRegistration\QRCodePayloadGenerator;

$generator = new QRCodePayloadGenerator();
$url = $generator->generateQRCodeUrl(
    LocationType::permanentWorkplace(),
    'Bauer + Kirch GmbH',
    'Pascalstr. 57, 52076 Aachen',
    120 // default check-in time in minutes
);
echo $url;