# QR Code
*By [endroid](https://endroid.nl/)*
[![Latest Stable Version](http://img.shields.io/packagist/v/endroid/qr-code.svg)](https://packagist.org/packages/endroid/qr-code)
[![Build Status](http://img.shields.io/travis/endroid/qr-code.svg)](http://travis-ci.org/endroid/qr-code)
[![Total Downloads](http://img.shields.io/packagist/dt/endroid/qr-code.svg)](https://packagist.org/packages/endroid/qr-code)
[![Monthly Downloads](http://img.shields.io/packagist/dm/endroid/qr-code.svg)](https://packagist.org/packages/endroid/qr-code)
[![License](http://img.shields.io/packagist/l/endroid/qr-code.svg)](https://packagist.org/packages/endroid/qr-code)
[![Donate](https://img.shields.io/badge/donate-paypal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RGH86QN825TWN)
This library helps you generate QR codes in a jiffy.
## Installation
Use [Composer](https://getcomposer.org/) to install the library.
``` bash
$ composer require endroid/qr-code
```
## Basic usage
```php
use Endroid\QrCode\QrCode;
$qrCode = new QrCode('Life is too short to be generating QR codes');
header('Content-Type: '.$qrCode->getContentType());
echo $qrCode->writeString();
```
## Advanced usage
```php
use Endroid\QrCode\ErrorCorrectionLevel;
use Endroid\QrCode\LabelAlignment;
use Endroid\QrCode\QrCode;
use Endroid\QrCode\Response\QrCodeResponse;
// Create a basic QR code
$qrCode = new QrCode('Life is too short to be generating QR codes');
$qrCode->setSize(300);
// Set advanced options
$qrCode->setWriterByName('png');
$qrCode->setMargin(10);
$qrCode->setEncoding('UTF-8');
$qrCode->setErrorCorrectionLevel(ErrorCorrectionLevel::HIGH);
$qrCode->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 0]);
$qrCode->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0]);
$qrCode->setLabel('Scan the code', 16, __DIR__.'/../assets/fonts/noto_sans.otf', LabelAlignment::CENTER);
$qrCode->setLogoPath(__DIR__.'/../assets/images/symfony.png');
$qrCode->setLogoWidth(150);
$qrCode->setRoundBlockSize(true);
$qrCode->setValidateResult(false);
// Directly output the QR code
header('Content-Type: '.$qrCode->getContentType());
echo $qrCode->writeString();
// Save it to a file
$qrCode->writeFile(__DIR__.'/qrcode.png');
// Create a response object
$response = new QrCodeResponse($qrCode);
```
![QR Code](https://endroid.nl/qr-code/Life%20is%20too%20short%20to%20be%20generating%20QR%20codes.png)
## Built-in validation reader
You can enable the built-in validation reader (disabled by default) by calling
setValidateResult(true). This validation reader does not guarantee that the QR
code will be readable by all readers but it helps you provide a minimum level
of quality.
The readability of a QR code is primarily determined by the size, the input
length, the error correction level and any possible logo over the image so you
can tweak these parameters if you are looking for optimal results. You can also
check $qrCode->getRoundBlockSize() value to see if block dimensions are rounded
so that the image is more sharp and readable.
Take note that the validator can consume quite amount of additional resources.
## Symfony integration
The [endroid/qr-code-bundle](https://github.com/endroid/qr-code-bundle)
integrates the QR code library in Symfony for an even better experience.
* Configure your defaults (like image size, default writer etc.)
* Generate QR codes quickly from anywhere via the factory service
* Generate QR codes directly by typing an URL like /qr-code/\<text>.png?size=300
* Generate QR codes or URLs directly from Twig using dedicated functions
Read the [bundle documentation](https://github.com/endroid/qr-code-bundle)
for more information.
## Versioning
Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility
breaking changes will be kept to a minimum but be aware that these can occur.
Lock your dependencies for production and test your code when upgrading.
## License
This bundle is under the MIT license. For the full copyright and license
information please view the LICENSE file that was distributed with this source code.
## Donation
If this project help you reduce time to develop, you can buy me a Tesla :)
[![paypal](https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_donate_92x26.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RGH86QN825TWN)
没有合适的资源?快使用搜索试试~ 我知道了~
【WordPress插件】2022年最新版完整功能demo+插件v2.5.0.zip
共250个文件
php:199个
md:9个
json:8个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 141 浏览量
2022-04-05
20:12:30
上传
评论
收藏 15.31MB ZIP 举报
温馨提示
"【WordPress插件】2022年最新版完整功能demo+插件v2.5.0 Gravity Forms QR Code 重力形成QR码" ---------- 泰森云每天更新发布最新WordPress主题、HTML主题、WordPress插件、shopify主题、opencart主题、PHP项目源码、安卓项目源码、ios项目源码,更有超10000个资源可供选择,如有需要请站内联系。
资源推荐
资源详情
资源评论
收起资源包目录
【WordPress插件】2022年最新版完整功能demo+插件v2.5.0.zip (250个子文件)
phpunit.xml.dist 893B
phpunit.xml.dist 892B
phpunit.xml.dist 887B
phpunit.xml.dist 304B
phpunit.xml.dist 241B
.gitattributes 140B
.gitignore 81B
.gitignore 67B
.gitignore 36B
.gitignore 34B
.gitignore 34B
.gitignore 23B
.gitignore 2B
installed.json 12KB
composer.json 1KB
composer.json 1KB
composer.json 889B
composer.json 818B
composer.json 740B
composer.json 703B
composer.json 677B
LICENSE 1KB
LICENSE 1KB
LICENSE 1KB
LICENSE 1KB
LICENSE 1KB
LICENSE 1KB
LICENSE 1KB
README.md 4KB
README.md 3KB
CHANGELOG.md 2KB
CHANGELOG.md 1KB
README.md 999B
README.md 738B
README.md 662B
README.md 631B
README.md 571B
spgfqrcode-de_DE.mo 2KB
noto_sans.otf 15.67MB
gravityforms_qrcode.pdf 374KB
OptionsResolverTest.php 53KB
OptionsResolver.php 33KB
PropertyAccessor.php 33KB
BitMatrix.php 28KB
FinderPatternFinder.php 27KB
class.gravityforms_qrcode.php 26KB
Version.php 25KB
Version.php 25KB
PropertyAccessorTest.php 24KB
Encoder.php 22KB
EncoderTest.php 19KB
MatrixUtil.php 18KB
Detector.php 16KB
MatrixUtilTest.php 15KB
ReedSolomonCodec.php 15KB
DecodedBitStreamParser.php 15KB
ClassLoader.php 13KB
BitArray.php 13KB
HybridBinarizer.php 11KB
AlignmentPatternFinder.php 11KB
autoload_static.php 10KB
PropertyPathBuilder.php 10KB
BitArray.php 10KB
RGBLuminanceSource.php 10KB
BitMatrixParser.php 9KB
MaskUtilTest.php 9KB
MaskUtil.php 9KB
GenericGFPoly.php 8KB
MonochromeRectangleDetector.php 8KB
BitMatrix.php 8KB
AbstractRenderer.php 8KB
QRCodeReader.php 8KB
QrCode.php 8KB
PropertyPathBuilderTest.php 8KB
autoload_classmap.php 7KB
ReedSolomonDecoder.php 7KB
InflectorTest.php 7KB
Inflector.php 7KB
GlobalHistogramBinarizer.php 7KB
GridSampler.php 7KB
Decoder.php 7KB
OptionsResolverIntrospectorTest.php 7KB
PerspectiveTransform.php 6KB
FormatInformation.php 6KB
class.gravityforms_qrcode.field.php 6KB
FormatInformation.php 6KB
PropertyAccessorCollectionTest.php 6KB
PngWriter.php 6KB
TextTest.php 6KB
FinderPattern.php 6KB
PropertyPath.php 6KB
BinaryBitmap.php 5KB
LuminanceSource.php 5KB
GenericGF.php 5KB
PropertyPathTest.php 5KB
GDLuminanceSource.php 5KB
PlanarYUVLuminanceSource.php 5KB
BitArrayTest.php 5KB
DataBlock.php 5KB
autoload_classmap.php 5KB
共 250 条
- 1
- 2
- 3
资源评论
Lee达森
- 粉丝: 966
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功