annotate vendor/endroid/qr-code/README.md @ 6:cec75ba50afc

endroid/qrcode as distributed
author Charlie Root
date Sat, 13 Jan 2018 09:00:52 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
1 QR Code
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
2 =======
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
3
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
4 *By [endroid](http://endroid.nl/)*
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
5
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
6 [![Latest Stable Version](http://img.shields.io/packagist/v/endroid/qrcode.svg)](https://packagist.org/packages/endroid/qrcode)
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
7 [![Build Status](http://img.shields.io/travis/endroid/QrCode.svg)](http://travis-ci.org/endroid/QrCode)
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
8 [![Total Downloads](http://img.shields.io/packagist/dt/endroid/qrcode.svg)](https://packagist.org/packages/endroid/qrcode)
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
9 [![License](http://img.shields.io/packagist/l/endroid/qrcode.svg)](https://packagist.org/packages/endroid/qrcode)
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
10
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
11 This library based on QRcode Perl CGI & PHP scripts by Y. Swetake helps you generate images containing a QR code.
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
12
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
13 ## Installation
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
14
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
15 Use [Composer](https://getcomposer.org/) to install the library.
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
16
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
17 ``` bash
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
18 $ composer require endroid/qrcode
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
19 ```
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
20
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
21 ## Usage
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
22
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
23 ```php
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
24 <?php
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
25
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
26 use Endroid\QrCode\QrCode;
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
27
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
28 $qrCode = new QrCode();
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
29 $qrCode
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
30 ->setText("Life is too short to be generating QR codes")
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
31 ->setSize(300)
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
32 ->setPadding(10)
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
33 ->setErrorCorrection('high')
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
34 ->setForegroundColor(array('r' => 0, 'g' => 0, 'b' => 0, 'a' => 0))
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
35 ->setBackgroundColor(array('r' => 255, 'g' => 255, 'b' => 255, 'a' => 0))
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
36 ->setLabel('My label')
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
37 ->setLabelFontSize(16)
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
38 ->render()
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
39 ;
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
40 ```
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
41
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
42 ![QR Code](http://endroid.nl/qrcode/Life%20is%20too%20short%20to%20be%20generating%20QR%20codes.png)
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
43
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
44 ## Symfony
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
45
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
46 You can use [`EndroidQrCodeBundle`](https://github.com/endroid/EndroidQrCodeBundle) to integrate this service in your Symfony application.
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
47
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
48 ## Versioning
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
49
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
50 Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatible
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
51 changes will be kept to a minimum but be aware that these can occur. Lock
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
52 your dependencies for production and test your code when upgrading.
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
53
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
54 ## License
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
55
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
56 This bundle is under the MIT license. For the full copyright and license
cec75ba50afc endroid/qrcode as distributed
Charlie Root
parents:
diff changeset
57 information please view the LICENSE file that was distributed with this source code.