classQRcode

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

Public Member Functions

 construct ($code, $eclevel= ‘L’)
 
 getBarcodeArray ()
 
 construct ($code, $eclevel= ‘L’)
 
 getBarcodeArray ()
 
 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)
 
 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)
 
 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.

Constructor & Destructor Documentation

QRcode::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

QRcode::__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

QRcode::__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

Member Function Documentation

QRcode::allocate (   $setLength)
protected

Return an array with zeros

Parameters
$setLength(int) array size
Returns
array

QRcode::allocate (   $setLength)
protected

Return an array with zeros

Parameters
$setLength(int) array size
Returns
array

QRcode::allocate (   $setLength)
protected

Return an array with zeros

Parameters
$setLength(int) array size
Returns
array

QRcode::appendBitstream (   $bitstream,
  $append 
)
protected

Append one bitstream to another

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

QRcode::appendBitstream (   $bitstream,
  $append 
)
protected

Append one bitstream to another

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

QRcode::appendBitstream (   $bitstream,
  $append 
)
protected

Append one bitstream to another

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

QRcode::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

QRcode::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

QRcode::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

QRcode::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

QRcode::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

QRcode::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

QRcode::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

QRcode::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

QRcode::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

QRcode::appendPaddingBit (   $bstream)
protected

Append Padding Bit to bitstream

Parameters
$bstream(array)
Returns
array bitstream

QRcode::appendPaddingBit (   $bstream)
protected

Append Padding Bit to bitstream

Parameters
$bstream(array)
Returns
array bitstream

QRcode::appendPaddingBit (   $bstream)
protected

Append Padding Bit to bitstream

Parameters
$bstream(array)
Returns
array bitstream

QRcode::binarize (   $frame)
protected

Convert the frame in binary form

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

QRcode::binarize (   $frame)
protected

Convert the frame in binary form

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

QRcode::binarize (   $frame)
protected

Convert the frame in binary form

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

QRcode::bitstreamToByte (   $bstream)
protected

Convert bitstream to bytes

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

QRcode::bitstreamToByte (   $bstream)
protected

Convert bitstream to bytes

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

QRcode::bitstreamToByte (   $bstream)
protected

Convert bitstream to bytes

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

QRcode::calcN1N3 (   $length)
protected

calcN1N3

Parameters
$length(int)
Returns
int demerit

QRcode::calcN1N3 (   $length)
protected

calcN1N3

Parameters
$length(int)
Returns
int demerit

QRcode::calcN1N3 (   $length)
protected

calcN1N3

Parameters
$length(int)
Returns
int demerit

QRcode::calcParity (   $items)
protected

calcParity

Parameters
$items(array)
Returns
int parity

QRcode::calcParity (   $items)
protected

calcParity

Parameters
$items(array)
Returns
int parity

QRcode::calcParity (   $items)
protected

calcParity

Parameters
$items(array)
Returns
int parity

QRcode::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

QRcode::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

QRcode::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

QRcode::checkModeAn (   $size,
  $data 
)
protected

checkModeAn

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

QRcode::checkModeAn (   $size,
  $data 
)
protected

checkModeAn

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

QRcode::checkModeAn (   $size,
  $data 
)
protected

checkModeAn

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

QRcode::checkModeKanji (   $size,
  $data 
)
protected

checkModeKanji

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

QRcode::checkModeKanji (   $size,
  $data 
)
protected

checkModeKanji

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

QRcode::checkModeKanji (   $size,
  $data 
)
protected

checkModeKanji

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

QRcode::checkModeNum (   $size,
  $data 
)
protected

checkModeNum

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

QRcode::checkModeNum (   $size,
  $data 
)
protected

checkModeNum

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

QRcode::checkModeNum (   $size,
  $data 
)
protected

checkModeNum

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

QRcode::convertData (   $items)
protected

convertData

Parameters
$items(array)
Returns
array items

QRcode::convertData (   $items)
protected

convertData

Parameters
$items(array)
Returns
array items

QRcode::convertData (   $items)
protected

convertData

Parameters
$items(array)
Returns
array items

QRcode::createBitStream (   $items)
protected

createBitStream

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

QRcode::createBitStream (   $items)
protected

createBitStream

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

QRcode::createBitStream (   $items)
protected

createBitStream

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

QRcode::createFrame (   $version)
protected

Return a copy of initialized frame.

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

QRcode::createFrame (   $version)
protected

Return a copy of initialized frame.

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

QRcode::createFrame (   $version)
protected

Return a copy of initialized frame.

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

QRcode::eat8 ( )
protected

eat8

Returns
int run

QRcode::eat8 ( )
protected

eat8

Returns
int run

QRcode::eat8 ( )
protected

eat8

Returns
int run

QRcode::eatAn ( )
protected

eatAn

Returns
int run

QRcode::eatAn ( )
protected

eatAn

Returns
int run

QRcode::eatAn ( )
protected

eatAn

Returns
int run

QRcode::eatKanji ( )
protected

eatKanji

Returns
int run

QRcode::eatKanji ( )
protected

eatKanji

Returns
int run

QRcode::eatKanji ( )
protected

eatKanji

Returns
int run

QRcode::eatNum ( )
protected

eatNum

Returns
int run

QRcode::eatNum ( )
protected

eatNum

Returns
int run

QRcode::eatNum ( )
protected

eatNum

Returns
int run

QRcode::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

QRcode::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

QRcode::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

QRcode::encodeBitStream (   $inputitem,
  $version 
)
protected

encodeBitStream

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

QRcode::encodeBitStream (   $inputitem,
  $version 
)
protected

encodeBitStream

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

QRcode::encodeBitStream (   $inputitem,
  $version 
)
protected

encodeBitStream

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

QRcode::encodeMask (   $mask)
protected

Encode mask

Parameters
$mask(int) masking mode

QRcode::encodeMask (   $mask)
protected

Encode mask

Parameters
$mask(int) masking mode

QRcode::encodeMask (   $mask)
protected

Encode mask

Parameters
$mask(int) masking mode

QRcode::encodeMode8 (   $inputitem,
  $version 
)
protected

encodeMode8

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

QRcode::encodeMode8 (   $inputitem,
  $version 
)
protected

encodeMode8

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

QRcode::encodeMode8 (   $inputitem,
  $version 
)
protected

encodeMode8

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

QRcode::encodeModeAn (   $inputitem,
  $version 
)
protected

encodeModeAn

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

QRcode::encodeModeAn (   $inputitem,
  $version 
)
protected

encodeModeAn

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

QRcode::encodeModeAn (   $inputitem,
  $version 
)
protected

encodeModeAn

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

QRcode::encodeModeKanji (   $inputitem,
  $version 
)
protected

encodeModeKanji

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

QRcode::encodeModeKanji (   $inputitem,
  $version 
)
protected

encodeModeKanji

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

QRcode::encodeModeKanji (   $inputitem,
  $version 
)
protected

encodeModeKanji

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

QRcode::encodeModeNum (   $inputitem,
  $version 
)
protected

encodeModeNum

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

QRcode::encodeModeNum (   $inputitem,
  $version 
)
protected

encodeModeNum

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

QRcode::encodeModeNum (   $inputitem,
  $version 
)
protected

encodeModeNum

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

QRcode::encodeModeStructure (   $inputitem)
protected

encodeModeStructure

Parameters
$inputitem(array)
Returns
array input item

QRcode::encodeModeStructure (   $inputitem)
protected

encodeModeStructure

Parameters
$inputitem(array)
Returns
array input item

QRcode::encodeModeStructure (   $inputitem)
protected

encodeModeStructure

Parameters
$inputitem(array)
Returns
array input item

QRcode::encodeString (   $string)
protected

Encode the input string to QR code

Parameters
$string(string) input string to encode

QRcode::encodeString (   $string)
protected

Encode the input string to QR code

Parameters
$string(string) input string to encode

QRcode::encodeString (   $string)
protected

Encode the input string to QR code

Parameters
$string(string) input string to encode

QRcode::estimateBitsMode8 (   $size)
protected

estimateBitsMode8

Parameters
$size(int)
Returns
int number of bits

QRcode::estimateBitsMode8 (   $size)
protected

estimateBitsMode8

Parameters
$size(int)
Returns
int number of bits

QRcode::estimateBitsMode8 (   $size)
protected

estimateBitsMode8

Parameters
$size(int)
Returns
int number of bits

QRcode::estimateBitsModeAn (   $size)
protected

estimateBitsModeAn

Parameters
$size(int)
Returns
int number of bits

QRcode::estimateBitsModeAn (   $size)
protected

estimateBitsModeAn

Parameters
$size(int)
Returns
int number of bits

QRcode::estimateBitsModeAn (   $size)
protected

estimateBitsModeAn

Parameters
$size(int)
Returns
int number of bits

QRcode::estimateBitsModeKanji (   $size)
protected

estimateBitsModeKanji

Parameters
$size(int)
Returns
int number of bits

QRcode::estimateBitsModeKanji (   $size)
protected

estimateBitsModeKanji

Parameters
$size(int)
Returns
int number of bits

QRcode::estimateBitsModeKanji (   $size)
protected

estimateBitsModeKanji

Parameters
$size(int)
Returns
int number of bits

QRcode::estimateBitsModeNum (   $size)
protected

estimateBitsModeNum

Parameters
$size(int)
Returns
int number of bits

QRcode::estimateBitsModeNum (   $size)
protected

estimateBitsModeNum

Parameters
$size(int)
Returns
int number of bits

QRcode::estimateBitsModeNum (   $size)
protected

estimateBitsModeNum

Parameters
$size(int)
Returns
int number of bits

QRcode::estimateBitStreamSize (   $items,
  $version 
)
protected

estimateBitStreamSize

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

QRcode::estimateBitStreamSize (   $items,
  $version 
)
protected

estimateBitStreamSize

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

QRcode::estimateBitStreamSize (   $items,
  $version 
)
protected

estimateBitStreamSize

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

QRcode::estimateVersion (   $items)
protected

estimateVersion

Parameters
$items(array)
Returns
int version

QRcode::estimateVersion (   $items)
protected

estimateVersion

Parameters
$items(array)
Returns
int version

QRcode::estimateVersion (   $items)
protected

estimateVersion

Parameters
$items(array)
Returns
int version

QRcode::evaluateSymbol (   $width,
  $frame 
)
protected

evaluateSymbol

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

QRcode::evaluateSymbol (   $width,
  $frame 
)
protected

evaluateSymbol

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

QRcode::evaluateSymbol (   $width,
  $frame 
)
protected

evaluateSymbol

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

QRcode::generateMaskNo (   $maskNo,
  $width,
  $frame 
)
protected

Return bitmask

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

QRcode::generateMaskNo (   $maskNo,
  $width,
  $frame 
)
protected

Return bitmask

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

QRcode::generateMaskNo (   $maskNo,
  $width,
  $frame 
)
protected

Return bitmask

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

QRcode::getBarcodeArray ( )

Returns a barcode array which is readable by TCPDF

Returns
array barcode array readable by TCPDF;

QRcode::getBarcodeArray ( )

Returns a barcode array which is readable by TCPDF

Returns
array barcode array readable by TCPDF;

QRcode::getBarcodeArray ( )

Returns a barcode array which is readable by TCPDF

Returns
array barcode array readable by TCPDF;

QRcode::getBitStream (   $items)
protected

Returns a stream of bits.

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

QRcode::getBitStream (   $items)
protected

Returns a stream of bits.

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

QRcode::getBitStream (   $items)
protected

Returns a stream of bits.

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

QRcode::getByteStream (   $items)
protected

Pack all bit streams padding bits into a byte array.

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

QRcode::getByteStream (   $items)
protected

Pack all bit streams padding bits into a byte array.

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

QRcode::getByteStream (   $items)
protected

Pack all bit streams padding bits into a byte array.

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

QRcode::getCode ( )
protected

Return Reed-Solomon block code.

Returns
array rsblocks

QRcode::getCode ( )
protected

Return Reed-Solomon block code.

Returns
array rsblocks

QRcode::getCode ( )
protected

Return Reed-Solomon block code.

Returns
array rsblocks

QRcode::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)

QRcode::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)

QRcode::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)

QRcode::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)

QRcode::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)

QRcode::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)

QRcode::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

QRcode::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

QRcode::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

QRcode::getFormatInfo (   $mask,
  $level 
)
protected

Return BCH encoded format information pattern.

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

QRcode::getFormatInfo (   $mask,
  $level 
)
protected

Return BCH encoded format information pattern.

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

QRcode::getFormatInfo (   $mask,
  $level 
)
protected

Return BCH encoded format information pattern.

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

QRcode::getFrameAt (   $at)
protected

Get frame value at specified position

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

QRcode::getFrameAt (   $at)
protected

Get frame value at specified position

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

QRcode::getFrameAt (   $at)
protected

Get frame value at specified position

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

QRcode::getMinimumVersion (   $size,
  $level 
)
protected

Return a version number that satisfies the input code length.

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

QRcode::getMinimumVersion (   $size,
  $level 
)
protected

Return a version number that satisfies the input code length.

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

QRcode::getMinimumVersion (   $size,
  $level 
)
protected

Return a version number that satisfies the input code length.

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

QRcode::getNextPosition ( )
protected

Return the next frame position

Returns
array of x,y coordinates

QRcode::getNextPosition ( )
protected

Return the next frame position

Returns
array of x,y coordinates

QRcode::getNextPosition ( )
protected

Return the next frame position

Returns
array of x,y coordinates

QRcode::getRemainder (   $version)
protected

Return the numer of remainder bits.

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

QRcode::getRemainder (   $version)
protected

Return the numer of remainder bits.

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

QRcode::getRemainder (   $version)
protected

Return the numer of remainder bits.

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

QRcode::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

QRcode::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

QRcode::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

QRcode::getWidth (   $version)
protected

Return the width of the symbol for the version.

Parameters
$version(int) version
Returns
int width

QRcode::getWidth (   $version)
protected

Return the width of the symbol for the version.

Parameters
$version(int) version
Returns
int width

QRcode::getWidth (   $version)
protected

Return the width of the symbol for the version.

Parameters
$version(int) version
Returns
int width

QRcode::identifyMode (   $pos)
protected

identifyMode

Parameters
$pos(int)
Returns
int mode

QRcode::identifyMode (   $pos)
protected

identifyMode

Parameters
$pos(int)
Returns
int mode

QRcode::identifyMode (   $pos)
protected

identifyMode

Parameters
$pos(int)
Returns
int mode

QRcode::init (   $spec)
protected

Initialize code.

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

QRcode::init (   $spec)
protected

Initialize code.

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

QRcode::init (   $spec)
protected

Initialize code.

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

QRcode::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
.

QRcode::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
.

QRcode::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
.

QRcode::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
.

QRcode::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
.

QRcode::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
.

QRcode::insertStructuredAppendHeader (   $items,
  $size,
  $index,
  $parity 
)
protected

insertStructuredAppendHeader

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

QRcode::insertStructuredAppendHeader (   $items,
  $size,
  $index,
  $parity 
)
protected

insertStructuredAppendHeader

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

QRcode::insertStructuredAppendHeader (   $items,
  $size,
  $index,
  $parity 
)
protected

insertStructuredAppendHeader

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

QRcode::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

QRcode::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

QRcode::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

QRcode::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

QRcode::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

QRcode::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

QRcode::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).

QRcode::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).

QRcode::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).

QRcode::lengthOfCode (   $mode,
  $version,
  $bits 
)
protected

lengthOfCode

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

QRcode::lengthOfCode (   $mode,
  $version,
  $bits 
)
protected

lengthOfCode

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

QRcode::lengthOfCode (   $mode,
  $version,
  $bits 
)
protected

lengthOfCode

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

QRcode::lookAnTable (   $c)
protected

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

Parameters
$c(int) character value
Returns
value

QRcode::lookAnTable (   $c)
protected

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

Parameters
$c(int) character value
Returns
value

QRcode::lookAnTable (   $c)
protected

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

Parameters
$c(int) character value
Returns
value

QRcode::makeMask (   $width,
  $frame,
  $maskNo,
  $level 
)
protected

makeMask

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

QRcode::makeMask (   $width,
  $frame,
  $maskNo,
  $level 
)
protected

makeMask

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

QRcode::makeMask (   $width,
  $frame,
  $maskNo,
  $level 
)
protected

makeMask

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

QRcode::makeMaskNo (   $maskNo,
  $width,
  $s,
$d,
  $maskGenOnly = false 
)
protected

makeMaskNo

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

QRcode::makeMaskNo (   $maskNo,
  $width,
  $s,
$d,
  $maskGenOnly = false 
)
protected

makeMaskNo

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

QRcode::makeMaskNo (   $maskNo,
  $width,
  $s,
$d,
  $maskGenOnly = false 
)
protected

makeMaskNo

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

QRcode::mask (   $width,
  $frame,
  $level 
)
protected

mask

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

QRcode::mask (   $width,
  $frame,
  $level 
)
protected

mask

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

QRcode::mask (   $width,
  $frame,
  $level 
)
protected

mask

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

QRcode::mask0 (   $x,
  $y 
)
protected

mask0

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

QRcode::mask0 (   $x,
  $y 
)
protected

mask0

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

QRcode::mask0 (   $x,
  $y 
)
protected

mask0

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

QRcode::mask1 (   $x,
  $y 
)
protected

mask1

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

QRcode::mask1 (   $x,
  $y 
)
protected

mask1

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

QRcode::mask1 (   $x,
  $y 
)
protected

mask1

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

QRcode::mask2 (   $x,
  $y 
)
protected

mask2

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

QRcode::mask2 (   $x,
  $y 
)
protected

mask2

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

QRcode::mask2 (   $x,
  $y 
)
protected

mask2

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

QRcode::mask3 (   $x,
  $y 
)
protected

mask3

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

QRcode::mask3 (   $x,
  $y 
)
protected

mask3

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

QRcode::mask3 (   $x,
  $y 
)
protected

mask3

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

QRcode::mask4 (   $x,
  $y 
)
protected

mask4

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

QRcode::mask4 (   $x,
  $y 
)
protected

mask4

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

QRcode::mask4 (   $x,
  $y 
)
protected

mask4

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

QRcode::mask5 (   $x,
  $y 
)
protected

mask5

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

QRcode::mask5 (   $x,
  $y 
)
protected

mask5

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

QRcode::mask5 (   $x,
  $y 
)
protected

mask5

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

QRcode::mask6 (   $x,
  $y 
)
protected

mask6

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

QRcode::mask6 (   $x,
  $y 
)
protected

mask6

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

QRcode::mask6 (   $x,
  $y 
)
protected

mask6

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

QRcode::mask7 (   $x,
  $y 
)
protected

mask7

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

QRcode::mask7 (   $x,
  $y 
)
protected

mask7

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

QRcode::mask7 (   $x,
  $y 
)
protected

mask7

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

QRcode::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)

QRcode::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)

QRcode::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)

QRcode::mergeBitStream (   $items)
protected

mergeBitStream

Parameters
$items(array) items
Returns
array bitstream

QRcode::mergeBitStream (   $items)
protected

mergeBitStream

Parameters
$items(array) items
Returns
array bitstream

QRcode::mergeBitStream (   $items)
protected

mergeBitStream

Parameters
$items(array) items
Returns
array bitstream

QRcode::modnn (   $rs,
  $x 
)
protected

modnn

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

QRcode::modnn (   $rs,
  $x 
)
protected

modnn

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

QRcode::modnn (   $rs,
  $x 
)
protected

modnn

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

QRcode::newFrame (   $version)
protected

Set new frame for the specified version.

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

QRcode::newFrame (   $version)
protected

Set new frame for the specified version.

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

QRcode::newFrame (   $version)
protected

Set new frame for the specified version.

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

QRcode::newFromBytes (   $size,
  $data 
)
protected

Return new bitstream from bytes

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

QRcode::newFromBytes (   $size,
  $data 
)
protected

Return new bitstream from bytes

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

QRcode::newFromBytes (   $size,
  $data 
)
protected

Return new bitstream from bytes

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

QRcode::newFromNum (   $bits,
  $num 
)
protected

Return new bitstream from number

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

QRcode::newFromNum (   $bits,
  $num 
)
protected

Return new bitstream from number

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

QRcode::newFromNum (   $bits,
  $num 
)
protected

Return new bitstream from number

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

QRcode::newInputItem (   $mode,
  $size,
  $data,
  $bstream = null 
)
protected

newInputItem

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

QRcode::newInputItem (   $mode,
  $size,
  $data,
  $bstream = null 
)
protected

newInputItem

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

QRcode::newInputItem (   $mode,
  $size,
  $data,
  $bstream = null 
)
protected

newInputItem

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

QRcode::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

QRcode::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

QRcode::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

QRcode::putAlignmentPattern (   $version,
  $frame,
  $width 
)
protected

Put an alignment pattern.

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

QRcode::putAlignmentPattern (   $version,
  $frame,
  $width 
)
protected

Put an alignment pattern.

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

QRcode::putAlignmentPattern (   $version,
  $frame,
  $width 
)
protected

Put an alignment pattern.

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

QRcode::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

QRcode::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

QRcode::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

QRcode::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

QRcode::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

QRcode::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

QRcode::rsBlockNum (   $spec)
protected

Return block number 0

Parameters
$spec(array)
Returns
int value

QRcode::rsBlockNum (   $spec)
protected

Return block number 0

Parameters
$spec(array)
Returns
int value

QRcode::rsBlockNum (   $spec)
protected

Return block number 0

Parameters
$spec(array)
Returns
int value

QRcode::rsBlockNum1 (   $spec)
protected

Return block number 1

Parameters
$spec(array)
Returns
int value

QRcode::rsBlockNum1 (   $spec)
protected

Return block number 1

Parameters
$spec(array)
Returns
int value

QRcode::rsBlockNum1 (   $spec)
protected

Return block number 1

Parameters
$spec(array)
Returns
int value

QRcode::rsBlockNum2 (   $spec)
protected

Return block number 2

Parameters
$spec(array)
Returns
int value

QRcode::rsBlockNum2 (   $spec)
protected

Return block number 2

Parameters
$spec(array)
Returns
int value

QRcode::rsBlockNum2 (   $spec)
protected

Return block number 2

Parameters
$spec(array)
Returns
int value

QRcode::rsDataCodes1 (   $spec)
protected

Return data codes 1

Parameters
$spec(array)
Returns
int value

QRcode::rsDataCodes1 (   $spec)
protected

Return data codes 1

Parameters
$spec(array)
Returns
int value

QRcode::rsDataCodes1 (   $spec)
protected

Return data codes 1

Parameters
$spec(array)
Returns
int value

QRcode::rsDataCodes2 (   $spec)
protected

Return data codes 2

Parameters
$spec(array)
Returns
int value

QRcode::rsDataCodes2 (   $spec)
protected

Return data codes 2

Parameters
$spec(array)
Returns
int value

QRcode::rsDataCodes2 (   $spec)
protected

Return data codes 2

Parameters
$spec(array)
Returns
int value

QRcode::rsDataLength (   $spec)
protected

Return data length

Parameters
$spec(array)
Returns
int value

QRcode::rsDataLength (   $spec)
protected

Return data length

Parameters
$spec(array)
Returns
int value

QRcode::rsDataLength (   $spec)
protected

Return data length

Parameters
$spec(array)
Returns
int value

QRcode::rsEccCodes1 (   $spec)
protected

Return ecc codes 1

Parameters
$spec(array)
Returns
int value

QRcode::rsEccCodes1 (   $spec)
protected

Return ecc codes 1

Parameters
$spec(array)
Returns
int value

QRcode::rsEccCodes1 (   $spec)
protected

Return ecc codes 1

Parameters
$spec(array)
Returns
int value

QRcode::rsEccCodes2 (   $spec)
protected

Return ecc codes 2

Parameters
$spec(array)
Returns
int value

QRcode::rsEccCodes2 (   $spec)
protected

Return ecc codes 2

Parameters
$spec(array)
Returns
int value

QRcode::rsEccCodes2 (   $spec)
protected

Return ecc codes 2

Parameters
$spec(array)
Returns
int value

QRcode::rsEccLength (   $spec)
protected

Return ecc length

Parameters
$spec(array)
Returns
int value

QRcode::rsEccLength (   $spec)
protected

Return ecc length

Parameters
$spec(array)
Returns
int value

QRcode::rsEccLength (   $spec)
protected

Return ecc length

Parameters
$spec(array)
Returns
int value

QRcode::setFrameAt (   $at,
  $val 
)
protected

Set frame value at specified position

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

QRcode::setFrameAt (   $at,
  $val 
)
protected

Set frame value at specified position

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

QRcode::setFrameAt (   $at,
  $val 
)
protected

Set frame value at specified position

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

QRcode::splitString ( )
protected

splitString

Returns
(int)

QRcode::splitString ( )
protected

splitString

Returns
(int)

QRcode::splitString ( )
protected

splitString

Returns
(int)

QRcode::toUpper ( )
protected

toUpper

QRcode::toUpper ( )
protected

toUpper

QRcode::toUpper ( )
protected

toUpper

QRcode::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

QRcode::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

QRcode::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

Member Data Documentation

QRcode::$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.

QRcode::$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.

QRcode::$b1
protected

Value b1.

QRcode::$barcode_array = array()
protected

Barcode array to be returned which is readable by TCPDF.

QRcode::$bit
protected

Single bit value.

QRcode::$blocks
protected

Blocks.

QRcode::$capacity
protected

Array Table of the capacity of symbols. See Table 1 (pp.13) and Table 12-16 (pp.30-36), JIS X0510:2004.

QRcode::$casesensitive = true
protected

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

QRcode::$count
protected

Counter.

QRcode::$data
protected

Mask data.

QRcode::$datacode = array()
protected

Data code.

QRcode::$dataLength
protected

Data length.

QRcode::$dataStr = “
protected

Input data string.

QRcode::$dir
protected

Direction.

QRcode::$ecccode = array()
protected

Error correction code.

QRcode::$eccLength
protected

Error correction length.

QRcode::$eccTable
protected

Array Table of the error correction code (Reed-Solomon block). See Table 12-16 (pp.30-36), JIS X0510:2004.

QRcode::$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

QRcode::$frame
protected

Frame.

QRcode::$frames = array()
protected

Array of frames.

QRcode::$hint = QR_MODE_8B
protected

Encoding mode.

QRcode::$items
protected

Input items.

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

Array Length indicator.

QRcode::$level = QR_ECLEVEL_L
protected

Levels of error correction. See definitions for possible values.

QRcode::$rsblocks = array()
protected

Reed-Solomon blocks.

QRcode::$rsitems = array()
protected

Reed-Solomon items.

QRcode::$runLength = array()
protected

Run length.

QRcode::$structured = 0
protected

Structured QR code (not supported yet).

QRcode::$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.

QRcode::$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]

QRcode::$width
protected

Width.

QRcode::$x
protected

X position of bit.

QRcode::$y
protected

Y position of bit.


The documentation for this class was generated from the following files:
  • /home/nick/WWW/_OPENSOURCE/TCExam/shared/include/barcodes/qrcode.orig.php
  • /home/nick/WWW/_OPENSOURCE/TCExam/shared/include/barcodes/qrcode.php

 

© 2004-2017 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy