adminweb / qrcode-zf2-module
A zend framework 2 module for generate qr code using the google api.
Installs: 4 214
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 2
Forks: 4
Open Issues: 0
Requires
- php: >=5.3.3
- zendframework/zendframework: 2.*
README
A zend framework 2 module for generate qr code using the google api.
See more in https://developers.google.com/chart/infographics/docs/qr_codes
Usage:
-
In application.config.php
return array( 'modules' => array( ..., 'QRCode', ....
-
In the controller
$qr = $this->getServiceLocator()->get('QRCode'); $qr->isHttps(); // or $qr->isHttp(); $qr->setData('Lorem Ipsum'); $qr->setDimensions(50, 50); return new ViewModel(array('img'=> $qr->getResult()));
-
In the view
<img src="<?php echo $this->img; ?>" />