ILIAS
Release_5_0_x_branch Revision 61816
|
Class to create QR-code arrays for TCPDF class. More...
Public Member Functions | |
__construct ($code, $eclevel= 'L') | |
This is the class constructor. | |
getBarcodeArray () | |
Returns a barcode array which is readable by TCPDF. |
Protected Member Functions | |
binarize ($frame) | |
Convert the frame in binary form. | |
encodeString ($string) | |
Encode the input string to QR code. | |
encodeMask ($mask) | |
Encode mask. | |
setFrameAt ($at, $val) | |
Set frame value at specified position. | |
getFrameAt ($at) | |
Get frame value at specified position. | |
getNextPosition () | |
Return the next frame position. | |
init ($spec) | |
Initialize code. | |
getCode () | |
Return Reed-Solomon block code. | |
writeFormatInformation ($width, &$frame, $mask, $level) | |
Write Format Information on frame and returns the number of black bits. | |
mask0 ($x, $y) | |
mask0 | |
mask1 ($x, $y) | |
mask1 | |
mask2 ($x, $y) | |
mask2 | |
mask3 ($x, $y) | |
mask3 | |
mask4 ($x, $y) | |
mask4 | |
mask5 ($x, $y) | |
mask5 | |
mask6 ($x, $y) | |
mask6 | |
mask7 ($x, $y) | |
mask7 | |
generateMaskNo ($maskNo, $width, $frame) | |
Return bitmask. | |
makeMaskNo ($maskNo, $width, $s, &$d, $maskGenOnly=false) | |
makeMaskNo | |
makeMask ($width, $frame, $maskNo, $level) | |
makeMask | |
calcN1N3 ($length) | |
calcN1N3 | |
evaluateSymbol ($width, $frame) | |
evaluateSymbol | |
mask ($width, $frame, $level) | |
mask | |
isdigitat ($str, $pos) | |
Return true if the character at specified position is a number. | |
isalnumat ($str, $pos) | |
Return true if the character at specified position is an alphanumeric character. | |
identifyMode ($pos) | |
identifyMode | |
eatNum () | |
eatNum | |
eatAn () | |
eatAn | |
eatKanji () | |
eatKanji | |
eat8 () | |
eat8 | |
splitString () | |
splitString | |
toUpper () | |
toUpper | |
newInputItem ($mode, $size, $data, $bstream=null) | |
newInputItem | |
encodeModeNum ($inputitem, $version) | |
encodeModeNum | |
encodeModeAn ($inputitem, $version) | |
encodeModeAn | |
encodeMode8 ($inputitem, $version) | |
encodeMode8 | |
encodeModeKanji ($inputitem, $version) | |
encodeModeKanji | |
encodeModeStructure ($inputitem) | |
encodeModeStructure | |
encodeBitStream ($inputitem, $version) | |
encodeBitStream | |
appendNewInputItem ($items, $mode, $size, $data) | |
Append data to an input object. | |
insertStructuredAppendHeader ($items, $size, $index, $parity) | |
insertStructuredAppendHeader | |
calcParity ($items) | |
calcParity | |
checkModeNum ($size, $data) | |
checkModeNum | |
lookAnTable ($c) | |
Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19). | |
checkModeAn ($size, $data) | |
checkModeAn | |
estimateBitsModeNum ($size) | |
estimateBitsModeNum | |
estimateBitsModeAn ($size) | |
estimateBitsModeAn | |
estimateBitsMode8 ($size) | |
estimateBitsMode8 | |
estimateBitsModeKanji ($size) | |
estimateBitsModeKanji | |
checkModeKanji ($size, $data) | |
checkModeKanji | |
check ($mode, $size, $data) | |
Validate the input data. | |
estimateBitStreamSize ($items, $version) | |
estimateBitStreamSize | |
estimateVersion ($items) | |
estimateVersion | |
lengthOfCode ($mode, $version, $bits) | |
lengthOfCode | |
createBitStream ($items) | |
createBitStream | |
convertData ($items) | |
convertData | |
appendPaddingBit ($bstream) | |
Append Padding Bit to bitstream. | |
mergeBitStream ($items) | |
mergeBitStream | |
getBitStream ($items) | |
Returns a stream of bits. | |
getByteStream ($items) | |
Pack all bit streams padding bits into a byte array. | |
allocate ($setLength) | |
Return an array with zeros. | |
newFromNum ($bits, $num) | |
Return new bitstream from number. | |
newFromBytes ($size, $data) | |
Return new bitstream from bytes. | |
appendBitstream ($bitstream, $append) | |
Append one bitstream to another. | |
appendNum ($bitstream, $bits, $num) | |
Append one bitstream created from number to another. | |
appendBytes ($bitstream, $size, $data) | |
Append one bitstream created from bytes to another. | |
bitstreamToByte ($bstream) | |
Convert bitstream to bytes. | |
qrstrset ($srctab, $x, $y, $repl, $replLen=false) | |
Replace a value on the array at the specified position. | |
getDataLength ($version, $level) | |
Return maximum data code length (bytes) for the version. | |
getECCLength ($version, $level) | |
Return maximum error correction code length (bytes) for the version. | |
getWidth ($version) | |
Return the width of the symbol for the version. | |
getRemainder ($version) | |
Return the numer of remainder bits. | |
getMinimumVersion ($size, $level) | |
Return a version number that satisfies the input code length. | |
lengthIndicator ($mode, $version) | |
Return the size of length indicator for the mode and version. | |
maximumWords ($mode, $version) | |
Return the maximum length for the mode and version. | |
getEccSpec ($version, $level, $spec) | |
Return an array of ECC specification. | |
putAlignmentMarker ($frame, $ox, $oy) | |
Put an alignment marker. | |
putAlignmentPattern ($version, $frame, $width) | |
Put an alignment pattern. | |
getVersionPattern ($version) | |
Return BCH encoded version information pattern that is used for the symbol of version 7 or greater. | |
getFormatInfo ($mask, $level) | |
Return BCH encoded format information pattern. | |
putFinderPattern ($frame, $ox, $oy) | |
Put a finder pattern. | |
createFrame ($version) | |
Return a copy of initialized frame. | |
newFrame ($version) | |
Set new frame for the specified version. | |
rsBlockNum ($spec) | |
Return block number 0. | |
rsBlockNum1 ($spec) | |
Return block number 1. | |
rsDataCodes1 ($spec) | |
Return data codes 1. | |
rsEccCodes1 ($spec) | |
Return ecc codes 1. | |
rsBlockNum2 ($spec) | |
Return block number 2. | |
rsDataCodes2 ($spec) | |
Return data codes 2. | |
rsEccCodes2 ($spec) | |
Return ecc codes 2. | |
rsDataLength ($spec) | |
Return data length. | |
rsEccLength ($spec) | |
Return ecc length. | |
init_rs ($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) | |
Initialize a Reed-Solomon codec and add it to existing rsitems. | |
modnn ($rs, $x) | |
modnn | |
init_rs_char ($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) | |
Initialize a Reed-Solomon codec and returns an array of values. | |
encode_rs_char ($rs, $data, $parity) | |
Encode a Reed-Solomon codec and returns the parity array. |
Protected Attributes | |
$barcode_array = array() | |
Barcode array to be returned which is readable by TCPDF. | |
$version = 0 | |
QR code version. | |
$level = QR_ECLEVEL_L | |
Levels of error correction. | |
$hint = QR_MODE_8B | |
Encoding mode. | |
$casesensitive = true | |
Boolean flag, if true the input string will be converted to uppercase. | |
$structured = 0 | |
Structured QR code (not supported yet). | |
$data | |
Mask data. | |
$width | |
Width. | |
$frame | |
Frame. | |
$x | |
X position of bit. | |
$y | |
Y position of bit. | |
$dir | |
Direction. | |
$bit | |
Single bit value. | |
$datacode = array() | |
Data code. | |
$ecccode = array() | |
Error correction code. | |
$blocks | |
Blocks. | |
$rsblocks = array() | |
Reed-Solomon blocks. | |
$count | |
Counter. | |
$dataLength | |
Data length. | |
$eccLength | |
Error correction length. | |
$b1 | |
Value b1. | |
$runLength = array() | |
Run length. | |
$dataStr = '' | |
Input data string. | |
$items | |
Input items. | |
$rsitems = array() | |
Reed-Solomon items. | |
$frames = array() | |
Array of frames. | |
$anTable | |
Alphabet-numeric convesion table. | |
$capacity | |
Array Table of the capacity of symbols. | |
$lengthTableBits | |
Array Length indicator. | |
$eccTable | |
Array Table of the error correction code (Reed-Solomon block). | |
$alignmentPattern | |
Array Positions of alignment patterns. | |
$versionPattern | |
Array Version information pattern (BCH coded). | |
$formatInfo | |
Array Format information. |
Class to create QR-code arrays for TCPDF class.
QR Code symbol is a 2D barcode that can be scanned by handy terminals such as a mobile phone with CCD. The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. This class supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1, Structured mode.
This class is derived from "PHP QR Code encoder" by Dominik Dzienia (http://phpqrcode.sourceforge.net/) based on "libqrencode C library 3.1.1." by Kentaro Fukuchi (http://megaui.net/fukuchi/works/qrencode/index.en.html), contains Reed-Solomon code written by Phil Karn, KA9Q. QR Code is registered trademark of DENSO WAVE INCORPORATED (http://www.denso-wave.com/qrcode/index-e.html). Please read comments on this class source file for full copyright and license information.
Definition at line 291 of file qrcode.php.
QRcode::__construct | ( | $code, | |
$eclevel = 'L' |
|||
) |
This is the class constructor.
Creates a QRcode object
$code | (string) code to represent using QRcode |
$eclevel | (string) error level:
|
Definition at line 639 of file qrcode.php.
References $barcode_array, $size, binarize(), and encodeString().
|
protected |
Return an array with zeros.
$setLength | (int) array size |
Definition at line 2128 of file qrcode.php.
Referenced by newFromBytes(), and newFromNum().
|
protected |
Append one bitstream to another.
$bitstream | (array) original bitstream |
$append | (array) bitstream to append |
Definition at line 2182 of file qrcode.php.
Referenced by appendBytes(), appendNum(), appendPaddingBit(), encodeBitStream(), and mergeBitStream().
|
protected |
Append one bitstream created from bytes to another.
$bitstream | (array) original bitstream |
$size | (int) size |
$data | (array) bytes |
Definition at line 2214 of file qrcode.php.
References $data, $size, appendBitstream(), and newFromBytes().
Referenced by appendPaddingBit().
|
protected |
Append data to an input object.
The data is copied and appended to the input object.
$items | (arrray) input items |
$mode | (int) encoding mode. |
$size | (int) size of data (byte). |
$data | (array) array of input data. |
Definition at line 1695 of file qrcode.php.
References $data, $items, $size, and newInputItem().
Referenced by eat8(), eatAn(), eatKanji(), and eatNum().
|
protected |
Append one bitstream created from number to another.
$bitstream | (array) original bitstream |
$bits | (int) number of bits |
$num | (int) number |
Definition at line 2199 of file qrcode.php.
References appendBitstream(), and newFromNum().
Referenced by appendPaddingBit(), encodeMode8(), encodeModeAn(), encodeModeKanji(), encodeModeNum(), and encodeModeStructure().
|
protected |
Append Padding Bit to bitstream.
$bstream | (array) |
Definition at line 2054 of file qrcode.php.
References appendBitstream(), appendBytes(), appendNum(), and getDataLength().
Referenced by getBitStream().
|
protected |
Convert the frame in binary form.
$frame | (array) array to binarize |
Definition at line 689 of file qrcode.php.
References $frame.
Referenced by __construct().
|
protected |
Convert bitstream to bytes.
$bstream | (array) original bitstream |
Definition at line 2227 of file qrcode.php.
Referenced by getByteStream().
|
protected |
calcN1N3
$length | (int) |
Definition at line 1126 of file qrcode.php.
Referenced by evaluateSymbol().
|
protected |
calcParity
$items | (array) |
Definition at line 1729 of file qrcode.php.
References $items.
|
protected |
Validate the input data.
$mode | (int) encoding mode. |
$size | (int) size of data (byte). |
$data | (array) data to validate |
Definition at line 1858 of file qrcode.php.
References $data, $size, checkModeAn(), checkModeKanji(), and checkModeNum().
Referenced by newInputItem().
|
protected |
checkModeAn
$size | (int) |
$data | (array) |
Definition at line 1771 of file qrcode.php.
References $data, $size, and lookAnTable().
Referenced by check().
|
protected |
checkModeKanji
$size | (int) |
$data | (array) |
Definition at line 1838 of file qrcode.php.
Referenced by check().
|
protected |
checkModeNum
$size | (int) |
$data | (array) |
Definition at line 1747 of file qrcode.php.
Referenced by check().
|
protected |
convertData
$items | (array) |
Definition at line 2025 of file qrcode.php.
References $items, createBitStream(), estimateVersion(), and getMinimumVersion().
Referenced by mergeBitStream().
|
protected |
createBitStream
$items | (array) |
Definition at line 2010 of file qrcode.php.
References $items, $total, and encodeBitStream().
Referenced by convertData().
|
protected |
Return a copy of initialized frame.
$version | (int) version |
Definition at line 2529 of file qrcode.php.
References $frame, $version, $width, $x, $y, getVersionPattern(), putAlignmentPattern(), putFinderPattern(), and qrstrset().
Referenced by newFrame().
|
protected |
eat8
Definition at line 1395 of file qrcode.php.
References appendNewInputItem(), estimateBitsMode8(), estimateBitsModeAn(), estimateBitsModeNum(), identifyMode(), isalnumat(), isdigitat(), and lengthIndicator().
Referenced by eatAn(), eatNum(), and splitString().
|
protected |
eatAn
Definition at line 1343 of file qrcode.php.
References appendNewInputItem(), eat8(), estimateBitsMode8(), estimateBitsModeAn(), estimateBitsModeNum(), isalnumat(), isdigitat(), and lengthIndicator().
Referenced by eatNum(), and splitString().
|
protected |
eatKanji
Definition at line 1382 of file qrcode.php.
References appendNewInputItem(), and identifyMode().
Referenced by splitString().
|
protected |
eatNum
Definition at line 1311 of file qrcode.php.
References appendNewInputItem(), eat8(), eatAn(), estimateBitsMode8(), estimateBitsModeAn(), estimateBitsModeNum(), identifyMode(), isdigitat(), and lengthIndicator().
Referenced by splitString().
|
protected |
Encode a Reed-Solomon codec and returns the parity array.
$rs | (array) RS values |
$data | (array) data |
$parity | (array) parity |
Definition at line 2827 of file qrcode.php.
References $data, and modnn().
Referenced by init().
|
protected |
encodeBitStream
$inputitem | (array) |
$version | (int) |
Definition at line 1640 of file qrcode.php.
References $version, appendBitstream(), encodeMode8(), encodeModeAn(), encodeModeKanji(), encodeModeNum(), encodeModeStructure(), maximumWords(), and newInputItem().
Referenced by createBitStream().
|
protected |
Encode mask.
$mask | (int) masking mode |
Definition at line 720 of file qrcode.php.
References $bit, $eccLength, $ret, getByteStream(), getCode(), getEccSpec(), getNextPosition(), getRemainder(), getWidth(), init(), makeMask(), mask(), newFrame(), rsBlockNum(), rsBlockNum1(), rsDataLength(), rsEccLength(), and setFrameAt().
Referenced by encodeString().
|
protected |
encodeMode8
$inputitem | (array) |
$version | (int) |
Definition at line 1586 of file qrcode.php.
References $version, appendNum(), and lengthIndicator().
Referenced by encodeBitStream().
|
protected |
encodeModeAn
$inputitem | (array) |
$version | (int) |
Definition at line 1563 of file qrcode.php.
References $version, appendNum(), lengthIndicator(), and lookAnTable().
Referenced by encodeBitStream().
|
protected |
encodeModeKanji
$inputitem | (array) |
$version | (int) |
Definition at line 1602 of file qrcode.php.
References $version, appendNum(), and lengthIndicator().
Referenced by encodeBitStream().
|
protected |
encodeModeNum
$inputitem | (array) |
$version | (int) |
Definition at line 1534 of file qrcode.php.
References $version, appendNum(), and lengthIndicator().
Referenced by encodeBitStream().
|
protected |
encodeModeStructure
$inputitem | (array) |
Definition at line 1625 of file qrcode.php.
References appendNum().
Referenced by encodeBitStream().
|
protected |
Encode the input string to QR code.
$string | (string) input string to encode |
Definition at line 704 of file qrcode.php.
References $ret, encodeMask(), splitString(), and toUpper().
Referenced by __construct().
|
protected |
estimateBitsMode8
$size | (int) |
Definition at line 1819 of file qrcode.php.
References $size.
Referenced by eat8(), eatAn(), eatNum(), and estimateBitStreamSize().
|
protected |
estimateBitsModeAn
$size | (int) |
Definition at line 1806 of file qrcode.php.
References $size.
Referenced by eat8(), eatAn(), eatNum(), and estimateBitStreamSize().
|
protected |
estimateBitsModeKanji
$size | (int) |
Definition at line 1828 of file qrcode.php.
References $size.
Referenced by estimateBitStreamSize().
|
protected |
estimateBitsModeNum
$size | (int) |
Definition at line 1785 of file qrcode.php.
References $size.
Referenced by eat8(), eatAn(), eatNum(), and estimateBitStreamSize().
|
protected |
estimateBitStreamSize
$items | (array) |
$version | (int) |
Definition at line 1891 of file qrcode.php.
References $items, $version, estimateBitsMode8(), estimateBitsModeAn(), estimateBitsModeKanji(), estimateBitsModeNum(), and lengthIndicator().
Referenced by estimateVersion().
|
protected |
estimateVersion
$items | (array) |
Definition at line 1934 of file qrcode.php.
References $items, $version, estimateBitStreamSize(), and getMinimumVersion().
Referenced by convertData().
|
protected |
evaluateSymbol
$width | (int) |
$frame | (array) |
Definition at line 1157 of file qrcode.php.
References $frame, $width, $x, $y, and calcN1N3().
Referenced by mask().
|
protected |
Return bitmask.
$maskNo | (int) mask number |
$width | (int) width |
$frame | (array) frame |
Definition at line 1063 of file qrcode.php.
References $frame, $width, $x, and $y.
Referenced by makeMaskNo().
QRcode::getBarcodeArray | ( | ) |
Returns a barcode array which is readable by TCPDF.
Definition at line 680 of file qrcode.php.
References $barcode_array.
|
protected |
Returns a stream of bits.
$items | (int) |
Definition at line 2104 of file qrcode.php.
References $items, appendPaddingBit(), and mergeBitStream().
Referenced by getByteStream().
|
protected |
Pack all bit streams padding bits into a byte array.
$items | (int) |
Definition at line 2114 of file qrcode.php.
References $items, bitstreamToByte(), and getBitStream().
Referenced by encodeMask().
|
protected |
Return Reed-Solomon block code.
Definition at line 909 of file qrcode.php.
References $b1, $blocks, $dataLength, $ret, and $row.
Referenced by encodeMask().
|
protected |
Return maximum data code length (bytes) for the version.
$version | (int) version |
$level | (int) error correction level |
Definition at line 2283 of file qrcode.php.
References $level, and $version.
Referenced by appendPaddingBit(), and getEccSpec().
|
protected |
Return maximum error correction code length (bytes) for the version.
$version | (int) version |
$level | (int) error correction level |
Definition at line 2293 of file qrcode.php.
References $level, and $version.
Referenced by getEccSpec().
|
protected |
Return an array of ECC specification.
$version | (int) version |
$level | (int) error correction level |
$spec | (array) an array of ECC specification contains as following: {# of type1 blocks, # of data code, # of ecc code, # of type2 blocks, # of data code} |
Definition at line 2384 of file qrcode.php.
References $b1, $data, $level, $version, getDataLength(), and getECCLength().
Referenced by encodeMask().
|
protected |
Return BCH encoded format information pattern.
$mask | (array) |
$level | (int) error correction level |
Definition at line 2491 of file qrcode.php.
References $level.
Referenced by writeFormatInformation().
|
protected |
Get frame value at specified position.
$at | (array) x,y position |
Definition at line 794 of file qrcode.php.
|
protected |
Return a version number that satisfies the input code length.
$size | (int) input code length (bytes) |
$level | (int) error correction level |
Definition at line 2321 of file qrcode.php.
Referenced by convertData(), and estimateVersion().
|
protected |
Return the next frame position.
Definition at line 802 of file qrcode.php.
References $dir, $width, $x, and $y.
Referenced by encodeMask().
|
protected |
Return the numer of remainder bits.
$version | (int) version |
Definition at line 2311 of file qrcode.php.
References $version.
Referenced by encodeMask().
|
protected |
Return BCH encoded version information pattern that is used for the symbol of version 7 or greater.
Use lower 18 bits.
$version | (int) version |
Definition at line 2478 of file qrcode.php.
References $version.
Referenced by createFrame().
|
protected |
Return the width of the symbol for the version.
$version | (int) version |
Definition at line 2302 of file qrcode.php.
References $version.
Referenced by encodeMask().
|
protected |
identifyMode
$pos | (int) |
Definition at line 1286 of file qrcode.php.
References $d, isalnumat(), and isdigitat().
Referenced by eat8(), eatKanji(), eatNum(), splitString(), and toUpper().
|
protected |
Initialize code.
$spec | (array) array of ECC specification |
Definition at line 858 of file qrcode.php.
References encode_rs_char(), init_rs(), rsBlockNum1(), rsBlockNum2(), rsDataCodes1(), rsDataCodes2(), rsEccCodes1(), and rsEccCodes2().
Referenced by encodeMask().
|
protected |
Initialize a Reed-Solomon codec and add it to existing rsitems.
$symsize | (int) symbol size, bits |
$gfpoly | (int) Field generator polynomial coefficients |
$fcr | (int) first root of RS code generator polynomial, index form |
$prim | (int) primitive element to generate polynomial roots |
$nroots | (int) RS code generator polynomial degree (number of roots) |
$pad | (int) padding bytes at front of shortened block |
Definition at line 2702 of file qrcode.php.
References init_rs_char().
Referenced by init().
|
protected |
Initialize a Reed-Solomon codec and returns an array of values.
$symsize | (int) symbol size, bits |
$gfpoly | (int) Field generator polynomial coefficients |
$fcr | (int) first root of RS code generator polynomial, index form |
$prim | (int) primitive element to generate polynomial roots |
$nroots | (int) RS code generator polynomial degree (number of roots) |
$pad | (int) padding bytes at front of shortened block |
Definition at line 2743 of file qrcode.php.
References modnn().
Referenced by init_rs().
|
protected |
insertStructuredAppendHeader
$items | (array) |
$size | (int) |
$index | (int) |
$parity | (int) |
Definition at line 1711 of file qrcode.php.
References $items, $size, and newInputItem().
|
protected |
Return true if the character at specified position is an alphanumeric character.
$str | (string) string |
$pos | (int) characted position |
Definition at line 1274 of file qrcode.php.
References lookAnTable().
Referenced by eat8(), eatAn(), and identifyMode().
|
protected |
Return true if the character at specified position is a number.
$str | (string) string |
$pos | (int) characted position |
Definition at line 1261 of file qrcode.php.
Referenced by eat8(), eatAn(), eatNum(), and identifyMode().
|
protected |
Return the size of length indicator for the mode and version.
$mode | (int) encoding mode |
$version | (int) version |
Definition at line 2338 of file qrcode.php.
References $version.
Referenced by eat8(), eatAn(), eatNum(), encodeMode8(), encodeModeAn(), encodeModeKanji(), encodeModeNum(), estimateBitStreamSize(), and lengthOfCode().
|
protected |
lengthOfCode
$mode | (int) |
$version | (int) |
$bits | (int) |
Definition at line 1955 of file qrcode.php.
References $size, $version, lengthIndicator(), and maximumWords().
|
protected |
Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19).
$c | (int) character value |
Definition at line 1761 of file qrcode.php.
Referenced by checkModeAn(), encodeModeAn(), and isalnumat().
|
protected |
makeMask
$width | (int) |
$frame | (array) |
$maskNo | (int) |
$level | (int) |
Definition at line 1114 of file qrcode.php.
References $frame, $level, $width, makeMaskNo(), and writeFormatInformation().
Referenced by encodeMask().
|
protected |
makeMaskNo
$maskNo | (int) |
$width | (int) |
$s | (int) |
$d | (int) |
$maskGenOnly | (boolean) |
Definition at line 1087 of file qrcode.php.
References $d, $width, $x, $y, and generateMaskNo().
Referenced by makeMask(), and mask().
|
protected |
mask
$width | (int) |
$frame | (array) |
$level | (int) |
Definition at line 1219 of file qrcode.php.
References $frame, $level, $width, evaluateSymbol(), makeMaskNo(), and writeFormatInformation().
Referenced by encodeMask().
|
protected |
|
protected |
mask1
$x | (int) X position |
$y | (int) Y position |
Definition at line 992 of file qrcode.php.
References $y.
|
protected |
mask2
$x | (int) X position |
$y | (int) Y position |
Definition at line 1002 of file qrcode.php.
References $x.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Return the maximum length for the mode and version.
$mode | (int) encoding mode |
$version | (int) version |
Definition at line 2358 of file qrcode.php.
References $version.
Referenced by encodeBitStream(), and lengthOfCode().
|
protected |
mergeBitStream
$items | (array) items |
Definition at line 2087 of file qrcode.php.
References $items, appendBitstream(), and convertData().
Referenced by getBitStream().
|
protected |
modnn
$rs | (array) RS values |
$x | (int) X position |
Definition at line 2725 of file qrcode.php.
References $x.
Referenced by encode_rs_char(), and init_rs_char().
|
protected |
Set new frame for the specified version.
$version | (int) version |
Definition at line 2594 of file qrcode.php.
References $version, and createFrame().
Referenced by encodeMask().
|
protected |
Return new bitstream from bytes.
$size | (int) size |
$data | (array) bytes |
Definition at line 2158 of file qrcode.php.
References $data, $size, and allocate().
Referenced by appendBytes().
|
protected |
Return new bitstream from number.
$bits | (int) number of bits |
$num | (int) number |
Definition at line 2138 of file qrcode.php.
References allocate().
Referenced by appendNum().
|
protected |
newInputItem
$mode | (int) |
$size | (int) |
$data | (array) |
$bstream | (array) |
Definition at line 1512 of file qrcode.php.
References $data, $size, and check().
Referenced by appendNewInputItem(), encodeBitStream(), and insertStructuredAppendHeader().
|
protected |
Put an alignment marker.
$frame | (array) frame |
$ox | (int) X center coordinate of the pattern |
$oy | (int) Y center coordinate of the pattern |
Definition at line 2415 of file qrcode.php.
References $frame, $y, and qrstrset().
Referenced by putAlignmentPattern().
|
protected |
Put an alignment pattern.
$version | (int) version |
$frame | (array) frame |
$width | (int) width |
Definition at line 2438 of file qrcode.php.
References $d, $frame, $version, $width, $x, $y, and putAlignmentMarker().
Referenced by createFrame().
|
protected |
Put a finder pattern.
$frame | (array) frame |
$ox | (int) X center coordinate of the pattern |
$oy | (int) Y center coordinate of the pattern |
Definition at line 2508 of file qrcode.php.
References $frame, $y, and qrstrset().
Referenced by createFrame().
|
protected |
Replace a value on the array at the specified position.
$srctab | (array) |
$x | (int) X position |
$y | (int) Y position |
$repl | (string) value to replace |
$replLen | (int) length of the repl string |
Definition at line 2272 of file qrcode.php.
Referenced by createFrame(), putAlignmentMarker(), and putFinderPattern().
|
protected |
Return block number 0.
$spec | (array) |
Definition at line 2612 of file qrcode.php.
Referenced by encodeMask().
|
protected |
Return block number 1.
$spec | (array) |
Definition at line 2621 of file qrcode.php.
Referenced by encodeMask(), and init().
|
protected |
Return block number 2.
$spec | (array) |
Definition at line 2648 of file qrcode.php.
Referenced by init().
|
protected |
Return data codes 1.
$spec | (array) |
Definition at line 2630 of file qrcode.php.
Referenced by init().
|
protected |
Return data codes 2.
$spec | (array) |
Definition at line 2657 of file qrcode.php.
Referenced by init().
|
protected |
Return data length.
$spec | (array) |
Definition at line 2675 of file qrcode.php.
Referenced by encodeMask().
|
protected |
Return ecc codes 1.
$spec | (array) |
Definition at line 2639 of file qrcode.php.
Referenced by init().
|
protected |
Return ecc codes 2.
$spec | (array) |
Definition at line 2666 of file qrcode.php.
Referenced by init().
|
protected |
Return ecc length.
$spec | (array) |
Definition at line 2684 of file qrcode.php.
Referenced by encodeMask().
|
protected |
Set frame value at specified position.
$at | (array) x,y position |
$val | (int) value of the character to set |
Definition at line 785 of file qrcode.php.
Referenced by encodeMask().
|
protected |
splitString
Definition at line 1444 of file qrcode.php.
References $hint, eat8(), eatAn(), eatKanji(), eatNum(), and identifyMode().
Referenced by encodeString().
|
protected |
toUpper
Definition at line 1483 of file qrcode.php.
References $dataStr, and identifyMode().
Referenced by encodeString().
|
protected |
Write Format Information on frame and returns the number of black bits.
$width | (int) frame width |
$frame | (array) frame |
$mask | (array) masking mode |
$level | (int) error correction level |
Definition at line 940 of file qrcode.php.
References $frame, $level, $width, and getFormatInfo().
Referenced by makeMask(), and mask().
|
protected |
Array Positions of alignment patterns.
This array includes only the second and the third position of the alignment patterns. Rest of them can be calculated from the distance between them. See Table 1 in Appendix E (pp.71) of JIS X0510:2004.
Definition at line 589 of file qrcode.php.
|
protected |
Alphabet-numeric convesion table.
Definition at line 463 of file qrcode.php.
|
protected |
|
protected |
Barcode array to be returned which is readable by TCPDF.
Definition at line 297 of file qrcode.php.
Referenced by __construct(), and getBarcodeArray().
|
protected |
|
protected |
|
protected |
Array Table of the capacity of symbols.
See Table 1 (pp.13) and Table 12-16 (pp.30-36), JIS X0510:2004.
Definition at line 479 of file qrcode.php.
|
protected |
Boolean flag, if true the input string will be converted to uppercase.
Definition at line 321 of file qrcode.php.
|
protected |
Counter.
Definition at line 403 of file qrcode.php.
|
protected |
Mask data.
Definition at line 333 of file qrcode.php.
Referenced by appendBytes(), appendNewInputItem(), bitstreamToByte(), check(), checkModeAn(), checkModeKanji(), checkModeNum(), encode_rs_char(), getEccSpec(), newFromBytes(), and newInputItem().
|
protected |
Data code.
Definition at line 379 of file qrcode.php.
|
protected |
|
protected |
|
protected |
|
protected |
Error correction code.
Definition at line 385 of file qrcode.php.
|
protected |
|
protected |
Array Table of the error correction code (Reed-Solomon block).
See Table 12-16 (pp.30-36), JIS X0510:2004.
Definition at line 539 of file qrcode.php.
|
protected |
Array Format information.
Definition at line 619 of file qrcode.php.
|
protected |
Frame.
Definition at line 347 of file qrcode.php.
Referenced by binarize(), createFrame(), evaluateSymbol(), generateMaskNo(), makeMask(), mask(), putAlignmentMarker(), putAlignmentPattern(), putFinderPattern(), and writeFormatInformation().
|
protected |
Array of frames.
Definition at line 457 of file qrcode.php.
|
protected |
|
protected |
Input items.
Definition at line 443 of file qrcode.php.
Referenced by appendNewInputItem(), calcParity(), convertData(), createBitStream(), estimateBitStreamSize(), estimateVersion(), getBitStream(), getByteStream(), insertStructuredAppendHeader(), and mergeBitStream().
|
protected |
Array Length indicator.
Definition at line 527 of file qrcode.php.
|
protected |
Levels of error correction.
See definitions for possible values.
Definition at line 309 of file qrcode.php.
Referenced by getDataLength(), getECCLength(), getEccSpec(), getFormatInfo(), getMinimumVersion(), makeMask(), mask(), and writeFormatInformation().
|
protected |
Reed-Solomon blocks.
Definition at line 397 of file qrcode.php.
|
protected |
Reed-Solomon items.
Definition at line 451 of file qrcode.php.
|
protected |
Run length.
Definition at line 429 of file qrcode.php.
|
protected |
Structured QR code (not supported yet).
Definition at line 327 of file qrcode.php.
|
protected |
QR code version.
Size of QRcode is defined as version. Version is from 1 to 40. Version 1 is 21*21 matrix. And 4 modules increases whenever 1 version increases. So version 40 is 177*177 matrix.
Definition at line 303 of file qrcode.php.
Referenced by createFrame(), encodeBitStream(), encodeMode8(), encodeModeAn(), encodeModeKanji(), encodeModeNum(), estimateBitStreamSize(), estimateVersion(), getDataLength(), getECCLength(), getEccSpec(), getRemainder(), getVersionPattern(), getWidth(), lengthIndicator(), lengthOfCode(), maximumWords(), newFrame(), and putAlignmentPattern().
|
protected |
Array Version information pattern (BCH coded).
See Table 1 in Appendix D (pp.68) of JIS X0510:2004. size: [QRSPEC_VERSION_MAX - 6]
Definition at line 607 of file qrcode.php.
|
protected |
Width.
Definition at line 341 of file qrcode.php.
Referenced by createFrame(), evaluateSymbol(), generateMaskNo(), getNextPosition(), makeMask(), makeMaskNo(), mask(), putAlignmentPattern(), and writeFormatInformation().
|
protected |
X position of bit.
Definition at line 353 of file qrcode.php.
Referenced by createFrame(), evaluateSymbol(), generateMaskNo(), getNextPosition(), makeMaskNo(), mask0(), mask2(), mask3(), mask4(), mask5(), mask6(), mask7(), modnn(), putAlignmentPattern(), and qrstrset().
|
protected |
Y position of bit.
Definition at line 359 of file qrcode.php.
Referenced by createFrame(), evaluateSymbol(), generateMaskNo(), getNextPosition(), makeMaskNo(), mask0(), mask1(), mask3(), mask4(), mask5(), mask6(), mask7(), putAlignmentMarker(), putAlignmentPattern(), putFinderPattern(), and qrstrset().