Moodle  2.2.1
http://www.collinsharper.com
QRcode Class Reference

Public Member Functions

 __construct ($code, $eclevel= 'L')
 getBarcodeArray ()

Protected Member Functions

 binarize ($frame)
 encodeString ($string)
 encodeMask ($mask)
 setFrameAt ($at, $val)
 getFrameAt ($at)
 getNextPosition ()
 init ($spec)
 getCode ()
 writeFormatInformation ($width, &$frame, $mask, $level)
 mask0 ($x, $y)
 mask1 ($x, $y)
 mask2 ($x, $y)
 mask3 ($x, $y)
 mask4 ($x, $y)
 mask5 ($x, $y)
 mask6 ($x, $y)
 mask7 ($x, $y)
 generateMaskNo ($maskNo, $width, $frame)
 makeMaskNo ($maskNo, $width, $s, &$d, $maskGenOnly=false)
 makeMask ($width, $frame, $maskNo, $level)
 calcN1N3 ($length)
 evaluateSymbol ($width, $frame)
 mask ($width, $frame, $level)
 isdigitat ($str, $pos)
 isalnumat ($str, $pos)
 identifyMode ($pos)
 eatNum ()
 eatAn ()
 eatKanji ()
 eat8 ()
 splitString ()
 toUpper ()
 newInputItem ($mode, $size, $data, $bstream=null)
 encodeModeNum ($inputitem, $version)
 encodeModeAn ($inputitem, $version)
 encodeMode8 ($inputitem, $version)
 encodeModeKanji ($inputitem, $version)
 encodeModeStructure ($inputitem)
 encodeBitStream ($inputitem, $version)
 appendNewInputItem ($items, $mode, $size, $data)
 insertStructuredAppendHeader ($items, $size, $index, $parity)
 calcParity ($items)
 checkModeNum ($size, $data)
 lookAnTable ($c)
 checkModeAn ($size, $data)
 estimateBitsModeNum ($size)
 estimateBitsModeAn ($size)
 estimateBitsMode8 ($size)
 estimateBitsModeKanji ($size)
 checkModeKanji ($size, $data)
 check ($mode, $size, $data)
 estimateBitStreamSize ($items, $version)
 estimateVersion ($items)
 lengthOfCode ($mode, $version, $bits)
 createBitStream ($items)
 convertData ($items)
 appendPaddingBit ($bstream)
 mergeBitStream ($items)
 getBitStream ($items)
 getByteStream ($items)
 allocate ($setLength)
 newFromNum ($bits, $num)
 newFromBytes ($size, $data)
 appendBitstream ($bitstream, $append)
 appendNum ($bitstream, $bits, $num)
 appendBytes ($bitstream, $size, $data)
 bitstreamToByte ($bstream)
 qrstrset ($srctab, $x, $y, $repl, $replLen=false)
 getDataLength ($version, $level)
 getECCLength ($version, $level)
 getWidth ($version)
 getRemainder ($version)
 getMinimumVersion ($size, $level)
 lengthIndicator ($mode, $version)
 maximumWords ($mode, $version)
 getEccSpec ($version, $level, $spec)
 putAlignmentMarker ($frame, $ox, $oy)
 putAlignmentPattern ($version, $frame, $width)
 getVersionPattern ($version)
 getFormatInfo ($mask, $level)
 putFinderPattern ($frame, $ox, $oy)
 createFrame ($version)
 newFrame ($version)
 rsBlockNum ($spec)
 rsBlockNum1 ($spec)
 rsDataCodes1 ($spec)
 rsEccCodes1 ($spec)
 rsBlockNum2 ($spec)
 rsDataCodes2 ($spec)
 rsEccCodes2 ($spec)
 rsDataLength ($spec)
 rsEccLength ($spec)
 init_rs ($symsize, $gfpoly, $fcr, $prim, $nroots, $pad)
 modnn ($rs, $x)
 init_rs_char ($symsize, $gfpoly, $fcr, $prim, $nroots, $pad)
 encode_rs_char ($rs, $data, $parity)

Protected Attributes

 $barcode_array = array()
 $version = 0
 $level = QR_ECLEVEL_L
 $hint = QR_MODE_8B
 $casesensitive = true
 $structured = 0
 $data
 $width
 $frame
 $x
 $y
 $dir
 $bit
 $datacode = array()
 $ecccode = array()
 $blocks
 $rsblocks = array()
 $count
 $dataLength
 $eccLength
 $b1
 $runLength = array()
 $dataStr = ''
 $items
 $rsitems = array()
 $frames = array()
 $anTable
 $capacity
 $lengthTableBits
 $eccTable
 $alignmentPattern
 $versionPattern
 $formatInfo

Detailed Description

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.


Constructor & Destructor Documentation

__construct ( code,
eclevel = 'L' 
)

This is the class constructor. Creates a QRcode object

Parameters:
$code(string) code to represent using QRcode
$eclevel(string) error level:
  • L : About 7% or less errors can be corrected.
  • M : About 15% or less errors can be corrected.
  • Q : About 25% or less errors can be corrected.
  • H : About 30% or less errors can be corrected.
Since:
1.0.000

Definition at line 639 of file qrcode.php.

Here is the call graph for this function:


Member Function Documentation

allocate ( setLength) [protected]

Return an array with zeros

Parameters:
$setLength(int) array size
Returns:
array

Definition at line 2129 of file qrcode.php.

Here is the caller graph for this function:

appendBitstream ( bitstream,
append 
) [protected]

Append one bitstream to another

Parameters:
$bitstream(array) original bitstream
$append(array) bitstream to append
Returns:
array bitstream

Definition at line 2183 of file qrcode.php.

Here is the caller graph for this function:

appendBytes ( bitstream,
size,
data 
) [protected]

Append one bitstream created from bytes to another

Parameters:
$bitstream(array) original bitstream
$size(int) size
$data(array) bytes
Returns:
array bitstream

Definition at line 2215 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

appendNewInputItem ( items,
mode,
size,
data 
) [protected]

Append data to an input object. The data is copied and appended to the input object.

Parameters:
$items(arrray) input items
$mode(int) encoding mode.
$size(int) size of data (byte).
$data(array) array of input data.
Returns:
items

Definition at line 1696 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

appendNum ( bitstream,
bits,
num 
) [protected]

Append one bitstream created from number to another

Parameters:
$bitstream(array) original bitstream
$bits(int) number of bits
$num(int) number
Returns:
array bitstream

Definition at line 2200 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

appendPaddingBit ( bstream) [protected]

Append Padding Bit to bitstream

Parameters:
$bstream(array)
Returns:
array bitstream

Definition at line 2055 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

binarize ( frame) [protected]

Convert the frame in binary form

Parameters:
$frame(array) array to binarize
Returns:
array frame in binary form

Definition at line 689 of file qrcode.php.

Here is the caller graph for this function:

bitstreamToByte ( bstream) [protected]

Convert bitstream to bytes

Parameters:
$bstream(array) original bitstream
Returns:
array of bytes

Definition at line 2228 of file qrcode.php.

Here is the caller graph for this function:

calcN1N3 ( length) [protected]

calcN1N3

Parameters:
$length(int)
Returns:
int demerit

Definition at line 1126 of file qrcode.php.

Here is the caller graph for this function:

calcParity ( items) [protected]

calcParity

Parameters:
$items(array)
Returns:
int parity

Definition at line 1730 of file qrcode.php.

check ( mode,
size,
data 
) [protected]

Validate the input data.

Parameters:
$mode(int) encoding mode.
$size(int) size of data (byte).
$data(array) data to validate
Returns:
boolean true in case of valid data, false otherwise

Definition at line 1859 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

checkModeAn ( size,
data 
) [protected]

checkModeAn

Parameters:
$size(int)
$data(array)
Returns:
boolean true or false

Definition at line 1772 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

checkModeKanji ( size,
data 
) [protected]

checkModeKanji

Parameters:
$size(int)
$data(array)
Returns:
boolean true or false

Definition at line 1839 of file qrcode.php.

Here is the caller graph for this function:

checkModeNum ( size,
data 
) [protected]

checkModeNum

Parameters:
$size(int)
$data(array)
Returns:
boolean true or false

Definition at line 1748 of file qrcode.php.

Here is the caller graph for this function:

convertData ( items) [protected]

convertData

Parameters:
$items(array)
Returns:
array items

Definition at line 2026 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

createBitStream ( items) [protected]

createBitStream

Parameters:
$items(array)
Returns:
array of items and total bits

Definition at line 2011 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

createFrame ( version) [protected]

Return a copy of initialized frame.

Parameters:
$version(int) version
Returns:
Array of unsigned char.

Definition at line 2529 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

eat8 ( ) [protected]

eat8

Returns:
int run

Definition at line 1395 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

eatAn ( ) [protected]

eatAn

Returns:
int run

Definition at line 1343 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

eatKanji ( ) [protected]

eatKanji

Returns:
int run

Definition at line 1382 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

eatNum ( ) [protected]

eatNum

Returns:
int run

Definition at line 1311 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

encode_rs_char ( rs,
data,
parity 
) [protected]

Encode a Reed-Solomon codec and returns the parity array

Parameters:
$rs(array) RS values
$data(array) data
$parity(array) parity
Returns:
parity array

Definition at line 2827 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

encodeBitStream ( inputitem,
version 
) [protected]

encodeBitStream

Parameters:
$inputitem(array)
$version(int)
Returns:
array input item

Definition at line 1641 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

encodeMask ( mask) [protected]

Encode mask

Parameters:
$mask(int) masking mode

Definition at line 720 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

encodeMode8 ( inputitem,
version 
) [protected]

encodeMode8

Parameters:
$inputitem(array)
$version(int)
Returns:
array input item

Definition at line 1587 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

encodeModeAn ( inputitem,
version 
) [protected]

encodeModeAn

Parameters:
$inputitem(array)
$version(int)
Returns:
array input item

Definition at line 1564 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

encodeModeKanji ( inputitem,
version 
) [protected]

encodeModeKanji

Parameters:
$inputitem(array)
$version(int)
Returns:
array input item

Definition at line 1603 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

encodeModeNum ( inputitem,
version 
) [protected]

encodeModeNum

Parameters:
$inputitem(array)
$version(int)
Returns:
array input item

Definition at line 1535 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

encodeModeStructure ( inputitem) [protected]

encodeModeStructure

Parameters:
$inputitem(array)
Returns:
array input item

Definition at line 1626 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

encodeString ( string) [protected]

Encode the input string to QR code

Parameters:
$string(string) input string to encode

Definition at line 704 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

estimateBitsMode8 ( size) [protected]

estimateBitsMode8

Parameters:
$size(int)
Returns:
int number of bits

Definition at line 1820 of file qrcode.php.

Here is the caller graph for this function:

estimateBitsModeAn ( size) [protected]

estimateBitsModeAn

Parameters:
$size(int)
Returns:
int number of bits

Definition at line 1807 of file qrcode.php.

Here is the caller graph for this function:

estimateBitsModeKanji ( size) [protected]

estimateBitsModeKanji

Parameters:
$size(int)
Returns:
int number of bits

Definition at line 1829 of file qrcode.php.

Here is the caller graph for this function:

estimateBitsModeNum ( size) [protected]

estimateBitsModeNum

Parameters:
$size(int)
Returns:
int number of bits

Definition at line 1786 of file qrcode.php.

Here is the caller graph for this function:

estimateBitStreamSize ( items,
version 
) [protected]

estimateBitStreamSize

Parameters:
$items(array)
$version(int)
Returns:
int bits

Definition at line 1892 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

estimateVersion ( items) [protected]

estimateVersion

Parameters:
$items(array)
Returns:
int version

Definition at line 1935 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

evaluateSymbol ( width,
frame 
) [protected]

evaluateSymbol

Parameters:
$width(int)
$frame(array)
Returns:
int demerit

Definition at line 1157 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

generateMaskNo ( maskNo,
width,
frame 
) [protected]

Return bitmask

Parameters:
$maskNo(int) mask number
$width(int) width
$frame(array) frame
Returns:
array bitmask

Definition at line 1063 of file qrcode.php.

Here is the caller graph for this function:

Returns a barcode array which is readable by TCPDF

Returns:
array barcode array readable by TCPDF;

Definition at line 680 of file qrcode.php.

getBitStream ( items) [protected]

Returns a stream of bits.

Parameters:
$items(int)
Returns:
array padded merged byte stream

Definition at line 2105 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getByteStream ( items) [protected]

Pack all bit streams padding bits into a byte array.

Parameters:
$items(int)
Returns:
array padded merged byte stream

Definition at line 2115 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getCode ( ) [protected]

Return Reed-Solomon block code.

Returns:
array rsblocks

Definition at line 909 of file qrcode.php.

Here is the caller graph for this function:

getDataLength ( version,
level 
) [protected]

Return maximum data code length (bytes) for the version.

Parameters:
$version(int) version
$level(int) error correction level
Returns:
int maximum size (bytes)

Definition at line 2284 of file qrcode.php.

Here is the caller graph for this function:

getECCLength ( version,
level 
) [protected]

Return maximum error correction code length (bytes) for the version.

Parameters:
$version(int) version
$level(int) error correction level
Returns:
int ECC size (bytes)

Definition at line 2294 of file qrcode.php.

Here is the caller graph for this function:

getEccSpec ( version,
level,
spec 
) [protected]

Return an array of ECC specification.

Parameters:
$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}
Returns:
array spec

Definition at line 2384 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getFormatInfo ( mask,
level 
) [protected]

Return BCH encoded format information pattern.

Parameters:
$mask(array)
$level(int) error correction level
Returns:
BCH encoded format information pattern

Definition at line 2491 of file qrcode.php.

Here is the caller graph for this function:

getFrameAt ( at) [protected]

Get frame value at specified position

Parameters:
$at(array) x,y position
Returns:
value at specified position

Definition at line 794 of file qrcode.php.

getMinimumVersion ( size,
level 
) [protected]

Return a version number that satisfies the input code length.

Parameters:
$size(int) input code length (byte)
$level(int) error correction level
Returns:
int version number

Definition at line 2322 of file qrcode.php.

Here is the caller graph for this function:

getNextPosition ( ) [protected]

Return the next frame position

Returns:
array of x,y coordinates

Definition at line 802 of file qrcode.php.

Here is the caller graph for this function:

getRemainder ( version) [protected]

Return the numer of remainder bits.

Parameters:
$version(int) version
Returns:
int number of remainder bits

Definition at line 2312 of file qrcode.php.

Here is the caller graph for this function:

getVersionPattern ( version) [protected]

Return BCH encoded version information pattern that is used for the symbol of version 7 or greater. Use lower 18 bits.

Parameters:
$version(int) version
Returns:
BCH encoded version information pattern

Definition at line 2478 of file qrcode.php.

Here is the caller graph for this function:

getWidth ( version) [protected]

Return the width of the symbol for the version.

Parameters:
$version(int) version
Returns:
int width

Definition at line 2303 of file qrcode.php.

Here is the caller graph for this function:

identifyMode ( pos) [protected]

identifyMode

Parameters:
$pos(int)
Returns:
int mode

Definition at line 1286 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

init ( spec) [protected]

Initialize code.

Parameters:
$spec(array) array of ECC specification
Returns:
0 in case of success, -1 in case of error

Definition at line 858 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

init_rs ( symsize,
gfpoly,
fcr,
prim,
nroots,
pad 
) [protected]

Initialize a Reed-Solomon codec and add it to existing rsitems

Parameters:
$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
Returns:
array Array of RS values:
  • mm = Bits per symbol;
  • nn = Symbols per block;
  • alpha_to = log lookup table array;
  • index_of = Antilog lookup table array;
  • genpoly = Generator polynomial array;
  • nroots = Number of generator;
  • roots = number of parity symbols;
  • fcr = First consecutive root, index form;
  • prim = Primitive element, index form;
  • iprim = prim-th root of 1, index form;
  • pad = Padding bytes in shortened block;
  • gfpoly
.

Definition at line 2702 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

init_rs_char ( symsize,
gfpoly,
fcr,
prim,
nroots,
pad 
) [protected]

Initialize a Reed-Solomon codec and returns an array of values.

Parameters:
$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
Returns:
array Array of RS values:
  • mm = Bits per symbol;
  • nn = Symbols per block;
  • alpha_to = log lookup table array;
  • index_of = Antilog lookup table array;
  • genpoly = Generator polynomial array;
  • nroots = Number of generator;
  • roots = number of parity symbols;
  • fcr = First consecutive root, index form;
  • prim = Primitive element, index form;
  • iprim = prim-th root of 1, index form;
  • pad = Padding bytes in shortened block;
  • gfpoly
.

Definition at line 2743 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

insertStructuredAppendHeader ( items,
size,
index,
parity 
) [protected]

insertStructuredAppendHeader

Parameters:
$items(array)
$size(int)
$index(int)
$parity(int)
Returns:
array items

Definition at line 1712 of file qrcode.php.

Here is the call graph for this function:

isalnumat ( str,
pos 
) [protected]

Return true if the character at specified position is an alphanumeric character

Parameters:
$str(string) string
$pos(int) characted position
Returns:
boolean true of false

Definition at line 1274 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

isdigitat ( str,
pos 
) [protected]

Return true if the character at specified position is a number

Parameters:
$str(string) string
$pos(int) characted position
Returns:
boolean true of false

Definition at line 1261 of file qrcode.php.

Here is the caller graph for this function:

lengthIndicator ( mode,
version 
) [protected]

Return the size of length indicator for the mode and version.

Parameters:
$mode(int) encoding mode
$version(int) version
Returns:
int the size of the appropriate length indicator (bits).

Definition at line 2338 of file qrcode.php.

Here is the caller graph for this function:

lengthOfCode ( mode,
version,
bits 
) [protected]

lengthOfCode

Parameters:
$mode(int)
$version(int)
$bits(int)
Returns:
int size

Definition at line 1956 of file qrcode.php.

Here is the call graph for this function:

lookAnTable ( c) [protected]

Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19).

Parameters:
$c(int) character value
Returns:
value

Definition at line 1762 of file qrcode.php.

Here is the caller graph for this function:

makeMask ( width,
frame,
maskNo,
level 
) [protected]

makeMask

Parameters:
$width(int)
$frame(array)
$maskNo(int)
$level(int)
Returns:
array mask

Definition at line 1114 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

makeMaskNo ( maskNo,
width,
s,
&$  d,
maskGenOnly = false 
) [protected]

makeMaskNo

Parameters:
$maskNo(int)
$width(int)
$s(int)
$d(int)
$maskGenOnly(boolean)
Returns:
int b

Definition at line 1087 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

mask ( width,
frame,
level 
) [protected]

mask

Parameters:
$width(int)
$frame(array)
$level(int)
Returns:
array best mask

Definition at line 1219 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

mask0 ( x,
y 
) [protected]

mask0

Parameters:
$x(int) X position
$y(int) Y position
Returns:
int mask

Definition at line 982 of file qrcode.php.

mask1 ( x,
y 
) [protected]

mask1

Parameters:
$x(int) X position
$y(int) Y position
Returns:
int mask

Definition at line 992 of file qrcode.php.

mask2 ( x,
y 
) [protected]

mask2

Parameters:
$x(int) X position
$y(int) Y position
Returns:
int mask

Definition at line 1002 of file qrcode.php.

mask3 ( x,
y 
) [protected]

mask3

Parameters:
$x(int) X position
$y(int) Y position
Returns:
int mask

Definition at line 1012 of file qrcode.php.

mask4 ( x,
y 
) [protected]

mask4

Parameters:
$x(int) X position
$y(int) Y position
Returns:
int mask

Definition at line 1022 of file qrcode.php.

mask5 ( x,
y 
) [protected]

mask5

Parameters:
$x(int) X position
$y(int) Y position
Returns:
int mask

Definition at line 1032 of file qrcode.php.

mask6 ( x,
y 
) [protected]

mask6

Parameters:
$x(int) X position
$y(int) Y position
Returns:
int mask

Definition at line 1042 of file qrcode.php.

mask7 ( x,
y 
) [protected]

mask7

Parameters:
$x(int) X position
$y(int) Y position
Returns:
int mask

Definition at line 1052 of file qrcode.php.

maximumWords ( mode,
version 
) [protected]

Return the maximum length for the mode and version.

Parameters:
$mode(int) encoding mode
$version(int) version
Returns:
int the maximum length (bytes)

Definition at line 2358 of file qrcode.php.

Here is the caller graph for this function:

mergeBitStream ( items) [protected]

mergeBitStream

Parameters:
$items(array) items
Returns:
array bitstream

Definition at line 2088 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

modnn ( rs,
x 
) [protected]

modnn

Parameters:
$rs(array) RS values
$x(int) X position
Returns:
int X osition

Definition at line 2725 of file qrcode.php.

Here is the caller graph for this function:

newFrame ( version) [protected]

Set new frame for the specified version.

Parameters:
$version(int) version
Returns:
Array of unsigned char.

Definition at line 2594 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

newFromBytes ( size,
data 
) [protected]

Return new bitstream from bytes

Parameters:
$size(int) size
$data(array) bytes
Returns:
array bitstream

Definition at line 2159 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

newFromNum ( bits,
num 
) [protected]

Return new bitstream from number

Parameters:
$bits(int) number of bits
$num(int) number
Returns:
array bitstream

Definition at line 2139 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

newInputItem ( mode,
size,
data,
bstream = null 
) [protected]

newInputItem

Parameters:
$mode(int)
$size(int)
$data(array)
$bstream(array)
Returns:
array input item

Definition at line 1513 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

putAlignmentMarker ( frame,
ox,
oy 
) [protected]

Put an alignment marker.

Parameters:
$frame(array) frame
$ox(int) X center coordinate of the pattern
$oy(int) Y center coordinate of the pattern
Returns:
array frame

Definition at line 2415 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

putAlignmentPattern ( version,
frame,
width 
) [protected]

Put an alignment pattern.

Parameters:
$version(int) version
$frame(array) frame
$width(int) width
Returns:
array frame

Definition at line 2438 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

putFinderPattern ( frame,
ox,
oy 
) [protected]

Put a finder pattern.

Parameters:
$frame(array) frame
$ox(int) X center coordinate of the pattern
$oy(int) Y center coordinate of the pattern
Returns:
array frame

Definition at line 2508 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

qrstrset ( srctab,
x,
y,
repl,
replLen = false 
) [protected]

Replace a value on the array at the specified position

Parameters:
$srctab(array)
$x(int) X position
$y(int) Y position
$repl(string) value to replace
$replLen(int) length of the repl string
Returns:
array srctab

Definition at line 2273 of file qrcode.php.

Here is the caller graph for this function:

rsBlockNum ( spec) [protected]

Return block number 0

Parameters:
$spec(array)
Returns:
int value

Definition at line 2612 of file qrcode.php.

Here is the caller graph for this function:

rsBlockNum1 ( spec) [protected]

Return block number 1

Parameters:
$spec(array)
Returns:
int value

Definition at line 2621 of file qrcode.php.

Here is the caller graph for this function:

rsBlockNum2 ( spec) [protected]

Return block number 2

Parameters:
$spec(array)
Returns:
int value

Definition at line 2648 of file qrcode.php.

Here is the caller graph for this function:

rsDataCodes1 ( spec) [protected]

Return data codes 1

Parameters:
$spec(array)
Returns:
int value

Definition at line 2630 of file qrcode.php.

Here is the caller graph for this function:

rsDataCodes2 ( spec) [protected]

Return data codes 2

Parameters:
$spec(array)
Returns:
int value

Definition at line 2657 of file qrcode.php.

Here is the caller graph for this function:

rsDataLength ( spec) [protected]

Return data length

Parameters:
$spec(array)
Returns:
int value

Definition at line 2675 of file qrcode.php.

Here is the caller graph for this function:

rsEccCodes1 ( spec) [protected]

Return ecc codes 1

Parameters:
$spec(array)
Returns:
int value

Definition at line 2639 of file qrcode.php.

Here is the caller graph for this function:

rsEccCodes2 ( spec) [protected]

Return ecc codes 2

Parameters:
$spec(array)
Returns:
int value

Definition at line 2666 of file qrcode.php.

Here is the caller graph for this function:

rsEccLength ( spec) [protected]

Return ecc length

Parameters:
$spec(array)
Returns:
int value

Definition at line 2684 of file qrcode.php.

Here is the caller graph for this function:

setFrameAt ( at,
val 
) [protected]

Set frame value at specified position

Parameters:
$at(array) x,y position
$val(int) value of the character to set

Definition at line 785 of file qrcode.php.

Here is the caller graph for this function:

splitString ( ) [protected]

splitString

Definition at line 1443 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

toUpper ( ) [protected]

toUpper

Definition at line 1484 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

writeFormatInformation ( width,
&$  frame,
mask,
level 
) [protected]

Write Format Information on frame and returns the number of black bits

Parameters:
$width(int) frame width
$frame(array) frame
$mask(array) masking mode
$level(int) error correction level
Returns:
int blacks

Definition at line 940 of file qrcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$alignmentPattern [protected]
Initial value:
 array(
                array( 0,  0),
                array( 0,  0), array(18,  0), array(22,  0), array(26,  0), array(30,  0), 
                array(34,  0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), 
                array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), 
                array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), 
                array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), 
                array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), 
                array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), 
                array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58)  
        )

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.

$anTable [protected]
Initial value:
 array(
                -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
                -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
                36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, 
                 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 44, -1, -1, -1, -1, -1, 
                -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 
                25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, 
                -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
                -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1  
                )

Alphabet-numeric convesion table.

Definition at line 463 of file qrcode.php.

$b1 [protected]

Value b1.

Definition at line 421 of file qrcode.php.

$barcode_array = array() [protected]

Barcode array to be returned which is readable by TCPDF.

Definition at line 297 of file qrcode.php.

$bit [protected]

Single bit value.

Definition at line 371 of file qrcode.php.

$blocks [protected]

Blocks.

Definition at line 391 of file qrcode.php.

$capacity [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.

$casesensitive = true [protected]

Boolean flag, if true the input string will be converted to uppercase.

Definition at line 321 of file qrcode.php.

$count [protected]

Counter.

Definition at line 403 of file qrcode.php.

$data [protected]

Mask data.

Definition at line 333 of file qrcode.php.

$datacode = array() [protected]

Data code.

Definition at line 379 of file qrcode.php.

$dataLength [protected]

Data length.

Definition at line 409 of file qrcode.php.

$dataStr = '' [protected]

Input data string.

Definition at line 437 of file qrcode.php.

$dir [protected]

Direction.

Definition at line 365 of file qrcode.php.

$ecccode = array() [protected]

Error correction code.

Definition at line 385 of file qrcode.php.

$eccLength [protected]

Error correction length.

Definition at line 415 of file qrcode.php.

$eccTable [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.

$formatInfo [protected]
Initial value:
 array(
                array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), 
                array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), 
                array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), 
                array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b)  
        )

Array Format information

Definition at line 619 of file qrcode.php.

$frame [protected]

Frame.

Definition at line 347 of file qrcode.php.

$frames = array() [protected]

Array of frames.

Definition at line 457 of file qrcode.php.

$hint = QR_MODE_8B [protected]

Encoding mode.

Definition at line 315 of file qrcode.php.

$items [protected]

Input items.

Definition at line 443 of file qrcode.php.

$lengthTableBits [protected]
Initial value:
 array(
                array(10, 12, 14),
                array( 9, 11, 13),
                array( 8, 16, 16),
                array( 8, 10, 12)
        )

Array Length indicator.

Definition at line 527 of file qrcode.php.

$level = QR_ECLEVEL_L [protected]

Levels of error correction. See definitions for possible values.

Definition at line 309 of file qrcode.php.

$rsblocks = array() [protected]

Reed-Solomon blocks.

Definition at line 397 of file qrcode.php.

$rsitems = array() [protected]

Reed-Solomon items.

Definition at line 451 of file qrcode.php.

$runLength = array() [protected]

Run length.

Definition at line 429 of file qrcode.php.

$structured = 0 [protected]

Structured QR code (not supported yet).

Definition at line 327 of file qrcode.php.

$version = 0 [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.

$versionPattern [protected]
Initial value:
 array(
                0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, 
                0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, 
                0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, 
                0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, 
                0x27541, 0x28c69
        )

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.

$width [protected]

Width.

Definition at line 341 of file qrcode.php.

$x [protected]

X position of bit.

Definition at line 353 of file qrcode.php.

$y [protected]

Y position of bit.

Definition at line 359 of file qrcode.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations