QR Code encoder. More...
Public Member Functions | |
| encodeRAW ($intext, $notused=false) | |
| Encodes input into Raw code table. More... | |
| encode ($intext, $outfile=false) | |
| Encodes input into binary code table. More... | |
| encodePNG ($intext, $outfile=false, $saveandprint=false) | |
| Encodes input into PNG image. More... | |
Static Public Member Functions | |
| static | factory ($level=QR_ECLEVEL_L, $size=3, $margin=4) |
| Encoder instances factory. More... | |
Public Attributes | |
| $casesensitive = true | |
| Boolean does input stream id case sensitive, if not encoder may use more optimal charsets | |
| $eightbit = false | |
| Boolean does input stream is 8 bit | |
| $version = 0 | |
| Integer code version (total size) if 0 - will be auto-detected | |
| $size = 3 | |
| Integer pixel zoom factor, multiplier to map virtual code pixels to image output pixels | |
| $margin = 4 | |
| Integer margin (silent zone) size, in code pixels | |
| $structured = 0 | |
| Structured QR codes. Not supported. | |
| $level = QR_ECLEVEL_L | |
| Integer error correction level QR_ECLEVEL_L, QR_ECLEVEL_M, QR_ECLEVEL_Q or QR_ECLEVEL_H | |
| $hint = QR_MODE_8 | |
| Integer encoding hint, QR_MODE_8 or QR_MODE_KANJI, Because Kanji encoding is kind of 8 bit encoding we need to hint encoder to use Kanji mode explicite. (otherwise it may try to encode it as plain 8 bit stream) | |
QR Code encoder.
Encoder is used by QRCode to create simple static code generators.
| QRencode::encode | ( | $intext, | |
$outfile = false |
|||
| ) |
Encodes input into binary code table.
| String | $intext | input text |
| String | $outfile | (optional) output file to save code table, if false file will be not saved |
| QRencode::encodePNG | ( | $intext, | |
$outfile = false, |
|||
$saveandprint = false |
|||
| ) |
Encodes input into PNG image.
| String | $intext | input text |
| String | $outfile | (optional) output file name, if false outputs to browser with required headers |
| Boolean | $saveandprint | (optional) if true code is outputed to browser and saved to file, otherwise only saved to file. It is effective only if $outfile is specified. |
| QRencode::encodeRAW | ( | $intext, | |
$notused = false |
|||
| ) |
Encodes input into Raw code table.
| String | $intext | input text |
| Boolean | $notused | (optional, not used) placeholder for similar outfile parameter |
|
static |
Encoder instances factory.
| Integer | $level | error correction level QR_ECLEVEL_L, QR_ECLEVEL_M, QR_ECLEVEL_Q or QR_ECLEVEL_H |
| Integer | $size | pixel zoom factor, multiplier to map virtual code pixels to image output pixels |
| Integer | $margin | margin (silent zone) size, in code pixels |
1.8.4