ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Class to create QR-code arrays for TCPDF class. More...
Public Member Functions | |
__construct ($code, $eclevel='L') | |
This is the class constructor. More... | |
getBarcodeArray () | |
Returns a barcode array which is readable by TCPDF. More... | |
Protected Member Functions | |
binarize ($frame) | |
Convert the frame in binary form. More... | |
encodeString ($string) | |
Encode the input string to QR code. More... | |
encodeMask ($mask) | |
Encode mask. More... | |
setFrameAt ($at, $val) | |
Set frame value at specified position. More... | |
getFrameAt ($at) | |
Get frame value at specified position. More... | |
getNextPosition () | |
Return the next frame position. More... | |
init ($spec) | |
Initialize code. More... | |
getCode () | |
Return Reed-Solomon block code. More... | |
writeFormatInformation ($width, &$frame, $mask, $level) | |
Write Format Information on frame and returns the number of black bits. More... | |
mask0 ($x, $y) | |
mask0 More... | |
mask1 ($x, $y) | |
mask1 More... | |
mask2 ($x, $y) | |
mask2 More... | |
mask3 ($x, $y) | |
mask3 More... | |
mask4 ($x, $y) | |
mask4 More... | |
mask5 ($x, $y) | |
mask5 More... | |
mask6 ($x, $y) | |
mask6 More... | |
mask7 ($x, $y) | |
mask7 More... | |
generateMaskNo ($maskNo, $width, $frame) | |
Return bitmask. More... | |
makeMaskNo ($maskNo, $width, $s, &$d, $maskGenOnly=false) | |
makeMaskNo More... | |
makeMask ($width, $frame, $maskNo, $level) | |
makeMask More... | |
calcN1N3 ($length) | |
calcN1N3 More... | |
evaluateSymbol ($width, $frame) | |
evaluateSymbol More... | |
mask ($width, $frame, $level) | |
mask More... | |
isdigitat ($str, $pos) | |
Return true if the character at specified position is a number. More... | |
isalnumat ($str, $pos) | |
Return true if the character at specified position is an alphanumeric character. More... | |
identifyMode ($pos) | |
identifyMode More... | |
eatNum () | |
eatNum More... | |
eatAn () | |
eatAn More... | |
eatKanji () | |
eatKanji More... | |
eat8 () | |
eat8 More... | |
splitString () | |
splitString More... | |
toUpper () | |
toUpper More... | |
newInputItem ($mode, $size, $data, $bstream=null) | |
newInputItem More... | |
encodeModeNum ($inputitem, $version) | |
encodeModeNum More... | |
encodeModeAn ($inputitem, $version) | |
encodeModeAn More... | |
encodeMode8 ($inputitem, $version) | |
encodeMode8 More... | |
encodeModeKanji ($inputitem, $version) | |
encodeModeKanji More... | |
encodeModeStructure ($inputitem) | |
encodeModeStructure More... | |
encodeBitStream ($inputitem, $version) | |
encodeBitStream More... | |
appendNewInputItem ($items, $mode, $size, $data) | |
Append data to an input object. More... | |
insertStructuredAppendHeader ($items, $size, $index, $parity) | |
insertStructuredAppendHeader More... | |
calcParity ($items) | |
calcParity More... | |
checkModeNum ($size, $data) | |
checkModeNum More... | |
lookAnTable ($c) | |
Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19). More... | |
checkModeAn ($size, $data) | |
checkModeAn More... | |
estimateBitsModeNum ($size) | |
estimateBitsModeNum More... | |
estimateBitsModeAn ($size) | |
estimateBitsModeAn More... | |
estimateBitsMode8 ($size) | |
estimateBitsMode8 More... | |
estimateBitsModeKanji ($size) | |
estimateBitsModeKanji More... | |
checkModeKanji ($size, $data) | |
checkModeKanji More... | |
check ($mode, $size, $data) | |
Validate the input data. More... | |
estimateBitStreamSize ($items, $version) | |
estimateBitStreamSize More... | |
estimateVersion ($items) | |
estimateVersion More... | |
lengthOfCode ($mode, $version, $bits) | |
lengthOfCode More... | |
createBitStream ($items) | |
createBitStream More... | |
convertData ($items) | |
convertData More... | |
appendPaddingBit ($bstream) | |
Append Padding Bit to bitstream. More... | |
mergeBitStream ($items) | |
mergeBitStream More... | |
getBitStream ($items) | |
Returns a stream of bits. More... | |
getByteStream ($items) | |
Pack all bit streams padding bits into a byte array. More... | |
allocate ($setLength) | |
Return an array with zeros. More... | |
newFromNum ($bits, $num) | |
Return new bitstream from number. More... | |
newFromBytes ($size, $data) | |
Return new bitstream from bytes. More... | |
appendBitstream ($bitstream, $append) | |
Append one bitstream to another. More... | |
appendNum ($bitstream, $bits, $num) | |
Append one bitstream created from number to another. More... | |
appendBytes ($bitstream, $size, $data) | |
Append one bitstream created from bytes to another. More... | |
bitstreamToByte ($bstream) | |
Convert bitstream to bytes. More... | |
qrstrset ($srctab, $x, $y, $repl, $replLen=false) | |
Replace a value on the array at the specified position. More... | |
getDataLength ($version, $level) | |
Return maximum data code length (bytes) for the version. More... | |
getECCLength ($version, $level) | |
Return maximum error correction code length (bytes) for the version. More... | |
getWidth ($version) | |
Return the width of the symbol for the version. More... | |
getRemainder ($version) | |
Return the numer of remainder bits. More... | |
getMinimumVersion ($size, $level) | |
Return a version number that satisfies the input code length. More... | |
lengthIndicator ($mode, $version) | |
Return the size of length indicator for the mode and version. More... | |
maximumWords ($mode, $version) | |
Return the maximum length for the mode and version. More... | |
getEccSpec ($version, $level, $spec) | |
Return an array of ECC specification. More... | |
putAlignmentMarker ($frame, $ox, $oy) | |
Put an alignment marker. More... | |
putAlignmentPattern ($version, $frame, $width) | |
Put an alignment pattern. More... | |
getVersionPattern ($version) | |
Return BCH encoded version information pattern that is used for the symbol of version 7 or greater. More... | |
getFormatInfo ($mask, $level) | |
Return BCH encoded format information pattern. More... | |
putFinderPattern ($frame, $ox, $oy) | |
Put a finder pattern. More... | |
createFrame ($version) | |
Return a copy of initialized frame. More... | |
newFrame ($version) | |
Set new frame for the specified version. More... | |
rsBlockNum ($spec) | |
Return block number 0. More... | |
rsBlockNum1 ($spec) | |
Return block number 1. More... | |
rsDataCodes1 ($spec) | |
Return data codes 1. More... | |
rsEccCodes1 ($spec) | |
Return ecc codes 1. More... | |
rsBlockNum2 ($spec) | |
Return block number 2. More... | |
rsDataCodes2 ($spec) | |
Return data codes 2. More... | |
rsEccCodes2 ($spec) | |
Return ecc codes 2. More... | |
rsDataLength ($spec) | |
Return data length. More... | |
rsEccLength ($spec) | |
Return ecc length. More... | |
init_rs ($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) | |
Initialize a Reed-Solomon codec and add it to existing rsitems. More... | |
modnn ($rs, $x) | |
modnn More... | |
init_rs_char ($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) | |
Initialize a Reed-Solomon codec and returns an array of values. More... | |
encode_rs_char ($rs, $data, $parity) | |
Encode a Reed-Solomon codec and returns the parity array. More... | |
Protected Attributes | |
$barcode_array = array() | |
Barcode array to be returned which is readable by TCPDF. More... | |
$version = 0 | |
QR code version. More... | |
$level = QR_ECLEVEL_L | |
Levels of error correction. More... | |
$hint = QR_MODE_8B | |
Encoding mode. More... | |
$casesensitive = true | |
Boolean flag, if true the input string will be converted to uppercase. More... | |
$structured = 0 | |
Structured QR code (not supported yet). More... | |
$data | |
Mask data. More... | |
$width | |
Width. More... | |
$frame | |
Frame. More... | |
$x | |
X position of bit. More... | |
$y | |
Y position of bit. More... | |
$dir | |
Direction. More... | |
$bit | |
Single bit value. More... | |
$datacode = array() | |
Data code. More... | |
$ecccode = array() | |
Error correction code. More... | |
$blocks | |
Blocks. More... | |
$rsblocks = array() | |
Reed-Solomon blocks. More... | |
$count | |
Counter. More... | |
$dataLength | |
Data length. More... | |
$eccLength | |
Error correction length. More... | |
$b1 | |
Value b1. More... | |
$runLength = array() | |
Run length. More... | |
$dataStr = '' | |
Input data string. More... | |
$items | |
Input items. More... | |
$rsitems = array() | |
Reed-Solomon items. More... | |
$frames = array() | |
Array of frames. More... | |
$anTable | |
Alphabet-numeric convesion table. More... | |
$capacity | |
Array Table of the capacity of symbols. More... | |
$lengthTableBits | |
Array Length indicator. More... | |
$eccTable | |
Array Table of the error correction code (Reed-Solomon block). More... | |
$alignmentPattern | |
Array Positions of alignment patterns. More... | |
$versionPattern | |
Array Version information pattern (BCH coded). More... | |
$formatInfo | |
Array Format information. More... | |
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, $code, $size, array, binarize(), data, and encodeString().
|
protected |
Return an array with zeros.
$setLength | (int) array size |
Definition at line 2129 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 2183 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 2215 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 1696 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 2200 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 2055 of file qrcode.php.
References appendBitstream(), appendBytes(), appendNum(), array, 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 2228 of file qrcode.php.
References $data, $size, and array.
Referenced by getByteStream().
|
protected |
calcN1N3
$length | (int) |
Definition at line 1127 of file qrcode.php.
Referenced by evaluateSymbol().
|
protected |
calcParity
$items | (array) |
Definition at line 1730 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 1859 of file qrcode.php.
References $data, $size, checkModeAn(), checkModeKanji(), and checkModeNum().
Referenced by newInputItem().
|
protected |
checkModeAn
$size | (int) |
$data | (array) |
Definition at line 1772 of file qrcode.php.
References $data, $size, and lookAnTable().
Referenced by check().
|
protected |
checkModeKanji
$size | (int) |
$data | (array) |
Definition at line 1839 of file qrcode.php.
Referenced by check().
|
protected |
checkModeNum
$size | (int) |
$data | (array) |
Definition at line 1748 of file qrcode.php.
Referenced by check().
|
protected |
convertData
$items | (array) |
Definition at line 2026 of file qrcode.php.
References $items, createBitStream(), estimateVersion(), and getMinimumVersion().
Referenced by mergeBitStream().
|
protected |
createBitStream
$items | (array) |
Definition at line 2011 of file qrcode.php.
References $items, $total, array, and encodeBitStream().
Referenced by convertData().
|
protected |
Return a copy of initialized frame.
$version | (int) version |
Definition at line 2530 of file qrcode.php.
References $frame, $version, $width, $x, $y, getVersionPattern(), putAlignmentPattern(), putFinderPattern(), and qrstrset().
Referenced by newFrame().
|
protected |
eat8
Definition at line 1396 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 1344 of file qrcode.php.
References appendNewInputItem(), eat8(), estimateBitsMode8(), estimateBitsModeAn(), estimateBitsModeNum(), isalnumat(), isdigitat(), and lengthIndicator().
Referenced by eatNum(), and splitString().
|
protected |
eatKanji
Definition at line 1383 of file qrcode.php.
References appendNewInputItem(), and identifyMode().
Referenced by splitString().
|
protected |
eatNum
Definition at line 1312 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 2828 of file qrcode.php.
References $data, and modnn().
Referenced by init().
|
protected |
encodeBitStream
$inputitem | (array) |
$version | (int) |
Definition at line 1641 of file qrcode.php.
References $version, appendBitstream(), array, 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, $code, $eccLength, $mask, $ret, array, data, 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 1587 of file qrcode.php.
References $version, appendNum(), array, and lengthIndicator().
Referenced by encodeBitStream().
|
protected |
encodeModeAn
$inputitem | (array) |
$version | (int) |
Definition at line 1564 of file qrcode.php.
References $version, appendNum(), array, lengthIndicator(), and lookAnTable().
Referenced by encodeBitStream().
|
protected |
encodeModeKanji
$inputitem | (array) |
$version | (int) |
Definition at line 1603 of file qrcode.php.
References $h, $version, appendNum(), array, and lengthIndicator().
Referenced by encodeBitStream().
|
protected |
encodeModeNum
$inputitem | (array) |
$version | (int) |
Definition at line 1535 of file qrcode.php.
References $version, appendNum(), array, and lengthIndicator().
Referenced by encodeBitStream().
|
protected |
encodeModeStructure
$inputitem | (array) |
Definition at line 1626 of file qrcode.php.
References appendNum(), and array.
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 1820 of file qrcode.php.
References $size.
Referenced by eat8(), eatAn(), eatNum(), and estimateBitStreamSize().
|
protected |
estimateBitsModeAn
$size | (int) |
Definition at line 1807 of file qrcode.php.
References $size.
Referenced by eat8(), eatAn(), eatNum(), and estimateBitStreamSize().
|
protected |
estimateBitsModeKanji
$size | (int) |
Definition at line 1829 of file qrcode.php.
References $size.
Referenced by estimateBitStreamSize().
|
protected |
estimateBitsModeNum
$size | (int) |
Definition at line 1786 of file qrcode.php.
Referenced by eat8(), eatAn(), eatNum(), and estimateBitStreamSize().
|
protected |
estimateBitStreamSize
$items | (array) |
$version | (int) |
Definition at line 1892 of file qrcode.php.
References $items, $l, $version, estimateBitsMode8(), estimateBitsModeAn(), estimateBitsModeKanji(), estimateBitsModeNum(), and lengthIndicator().
Referenced by estimateVersion().
|
protected |
estimateVersion
$items | (array) |
Definition at line 1935 of file qrcode.php.
References $items, $version, estimateBitStreamSize(), and getMinimumVersion().
Referenced by convertData().
|
protected |
evaluateSymbol
$width | (int) |
$frame | (array) |
Definition at line 1158 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 1064 of file qrcode.php.
References $frame, $width, $x, $y, and array.
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 2105 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 2115 of file qrcode.php.
References $items, bitstreamToByte(), and getBitStream().
Referenced by encodeMask().
|
protected |
Return Reed-Solomon block code.
Definition at line 910 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 2284 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 2294 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 2385 of file qrcode.php.
References $b1, $data, $level, $version, array, getDataLength(), and getECCLength().
Referenced by encodeMask().
|
protected |
Return BCH encoded format information pattern.
$mask | (array) |
$level | (int) error correction level |
Definition at line 2492 of file qrcode.php.
Referenced by writeFormatInformation().
|
protected |
Get frame value at specified position.
$at | (array) x,y position |
Definition at line 795 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 2322 of file qrcode.php.
Referenced by convertData(), and estimateVersion().
|
protected |
Return the next frame position.
Definition at line 803 of file qrcode.php.
References $dir, $w, $width, $x, $y, and array.
Referenced by encodeMask().
|
protected |
Return the numer of remainder bits.
$version | (int) version |
Definition at line 2312 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 2479 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 2303 of file qrcode.php.
References $version.
Referenced by encodeMask().
|
protected |
identifyMode
$pos | (int) |
Definition at line 1287 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 859 of file qrcode.php.
References array, 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 2703 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 2744 of file qrcode.php.
References array, and modnn().
Referenced by init_rs().
|
protected |
insertStructuredAppendHeader
$items | (array) |
$size | (int) |
$index | (int) |
$parity | (int) |
Definition at line 1712 of file qrcode.php.
References $items, $size, array, 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 1275 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 1262 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 2339 of file qrcode.php.
Referenced by eat8(), eatAn(), eatNum(), encodeMode8(), encodeModeAn(), encodeModeKanji(), encodeModeNum(), estimateBitStreamSize(), and lengthOfCode().
|
protected |
lengthOfCode
$mode | (int) |
$version | (int) |
$bits | (int) |
Definition at line 1956 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 1762 of file qrcode.php.
Referenced by checkModeAn(), encodeModeAn(), and isalnumat().
|
protected |
makeMask
$width | (int) |
$frame | (array) |
$maskNo | (int) |
$level | (int) |
Definition at line 1115 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 1088 of file qrcode.php.
References $d, $width, $x, $y, array, and generateMaskNo().
Referenced by makeMask(), and mask().
|
protected |
mask
$width | (int) |
$frame | (array) |
$level | (int) |
Definition at line 1220 of file qrcode.php.
References $frame, $level, $mask, $width, array, evaluateSymbol(), makeMaskNo(), and writeFormatInformation().
Referenced by encodeMask().
|
protected |
mask0
$x | (int) X position |
$y | (int) Y position |
Definition at line 983 of file qrcode.php.
|
protected |
mask1
$x | (int) X position |
$y | (int) Y position |
Definition at line 993 of file qrcode.php.
References $y.
|
protected |
mask2
$x | (int) X position |
$y | (int) Y position |
Definition at line 1003 of file qrcode.php.
References $x.
|
protected |
mask3
$x | (int) X position |
$y | (int) Y position |
Definition at line 1013 of file qrcode.php.
|
protected |
mask4
$x | (int) X position |
$y | (int) Y position |
Definition at line 1023 of file qrcode.php.
|
protected |
mask5
$x | (int) X position |
$y | (int) Y position |
Definition at line 1033 of file qrcode.php.
|
protected |
mask6
$x | (int) X position |
$y | (int) Y position |
Definition at line 1043 of file qrcode.php.
|
protected |
mask7
$x | (int) X position |
$y | (int) Y position |
Definition at line 1053 of file qrcode.php.
|
protected |
Return the maximum length for the mode and version.
$mode | (int) encoding mode |
$version | (int) version |
Definition at line 2359 of file qrcode.php.
Referenced by encodeBitStream(), and lengthOfCode().
|
protected |
mergeBitStream
$items | (array) items |
Definition at line 2088 of file qrcode.php.
References $items, appendBitstream(), array, and convertData().
Referenced by getBitStream().
|
protected |
modnn
$rs | (array) RS values |
$x | (int) X position |
Definition at line 2726 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 2595 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 2159 of file qrcode.php.
References $data, $mask, $size, and allocate().
Referenced by appendBytes().
|
protected |
Return new bitstream from number.
$bits | (int) number of bits |
$num | (int) number |
Definition at line 2139 of file qrcode.php.
References $mask, and allocate().
Referenced by appendNum().
|
protected |
newInputItem
$mode | (int) |
$size | (int) |
$data | (array) |
$bstream | (array) |
Definition at line 1513 of file qrcode.php.
References $data, $size, array, 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 2416 of file qrcode.php.
References $frame, $y, array, and qrstrset().
Referenced by putAlignmentPattern().
|
protected |
Put an alignment pattern.
$version | (int) version |
$frame | (array) frame |
$width | (int) width |
Definition at line 2439 of file qrcode.php.
References $d, $frame, $version, $w, $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 2509 of file qrcode.php.
References $frame, $y, array, 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 2273 of file qrcode.php.
Referenced by createFrame(), putAlignmentMarker(), and putFinderPattern().
|
protected |
Return block number 0.
$spec | (array) |
Definition at line 2613 of file qrcode.php.
Referenced by encodeMask().
|
protected |
Return block number 1.
$spec | (array) |
Definition at line 2622 of file qrcode.php.
Referenced by encodeMask(), and init().
|
protected |
Return block number 2.
$spec | (array) |
Definition at line 2649 of file qrcode.php.
Referenced by init().
|
protected |
Return data codes 1.
$spec | (array) |
Definition at line 2631 of file qrcode.php.
Referenced by init().
|
protected |
Return data codes 2.
$spec | (array) |
Definition at line 2658 of file qrcode.php.
Referenced by init().
|
protected |
Return data length.
$spec | (array) |
Definition at line 2676 of file qrcode.php.
Referenced by encodeMask().
|
protected |
Return ecc codes 1.
$spec | (array) |
Definition at line 2640 of file qrcode.php.
Referenced by init().
|
protected |
Return ecc codes 2.
$spec | (array) |
Definition at line 2667 of file qrcode.php.
Referenced by init().
|
protected |
Return ecc length.
$spec | (array) |
Definition at line 2685 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 786 of file qrcode.php.
Referenced by encodeMask().
|
protected |
splitString
Definition at line 1445 of file qrcode.php.
References $hint, eat8(), eatAn(), eatKanji(), eatNum(), and identifyMode().
Referenced by encodeString().
|
protected |
toUpper
Definition at line 1484 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 941 of file qrcode.php.
References $frame, $level, $mask, $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 |
|
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().