zikarsky / qrcode-bundle
A bundle providing a tight Symfony2 and Twig integration aiming to support multiple QRCode libraries.
Installs: 69
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- endroid/qrcode: ~1.1
- rhumsaa/uuid: ~2.4
- symfony/config: ~2.3
- symfony/http-foundation: ~2.3
- symfony/http-kernel: ~2.3
This package is auto-updated.
Last update: 2022-04-25 14:53:59 UTC
README
This bundle aims for an easy Symfony2 and Twig integration for QRCodes. It allows for multiple qr-implementations and different storage-solutions to store qr-code-configuration between requests.
Current state
While most of the groundwork is done, the library is in pre-alpha state. There is only 1 renderer implementation (for endroid/qrcode) and only a session-storage. Also tests and documentation are insufficient or even missing.
But it works in this specific configuration
Examples
Assuming $container is the Symfony2 DIC:
use Zikarsky\Bundle\QRCodeBundle as QR;
$qrcodeService = $container->get('zikarsky_qrcode.service');
$qrCode = new QR\QRCode('Test');
/** @var $renderedQRCode QR\RenderedQRCode */
$renderedQRCode = $qrCodeService->render($qrCode);
Or in a twig template:
<img src="{{ qrcode("test", 150, "medium") }}" />