Class: QRcode
Source Location: /qrcode.php
  
 
Class to create QR-code arrays for TCPDF class. 
  
Author(s):
        
          
                  
Version:
Copyright:
  - 2010-2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
 
 
        
 | 
 | 
 | 
  
 
 
Class Details
  
 
 
Class Variables
 
 
Class Methods
   
	
	constructor __construct [line 648]
	
    
    
		QRcode __construct(
string
$code, [string
$eclevel = 'L'])
     |   
     |  
 
	
		This is the class constructor. Creates a QRcode object 
Tags:
	
        Parameters:
    
        
   
   
	
	method allocate [line 2139]
	
    
    
		array allocate(
int
$setLength)
     |   
     |  
 
	
		Return an array with zeros
 Tags:
	
        Parameters:
    
        
   
   
	
	method appendBitstream [line 2193]
	
    
    
		array appendBitstream(
array
$bitstream, array
$append)
     |   
     |  
 
	
		Append one bitstream to another
 Tags:
	
        Parameters:
    
        
   
   
	
	method appendBytes [line 2225]
	
    
    
		array appendBytes(
array
$bitstream, int
$size, array
$data)
     |   
     |  
 
	
		Append one bitstream created from bytes to another
 Tags:
	
        Parameters:
    
        
   
   
	
	method appendNewInputItem [line 1705]
	
    
    
		items appendNewInputItem(
array
$items, int
$mode, int
$size, array
$data)
     |   
     |  
 
	
		Append data to an input object. The data is copied and appended to the input object. 
Tags:
	
        Parameters:
    
        
   
   
	
	method appendNum [line 2210]
	
    
    
		array appendNum(
array
$bitstream, int
$bits, int
$num)
     |   
     |  
 
	
		Append one bitstream created from number to another
 Tags:
	
        Parameters:
    
        
   
   
	
	method appendPaddingBit [line 2065]
	
    
    
		array appendPaddingBit(
array
$bstream)
     |   
     |  
 
	
		Append Padding Bit to bitstream
 Tags:
	
        Parameters:
    
        
   
   
	
	method binarize [line 698]
	
    
    
		array binarize(
array
$frame)
     |   
     |  
 
	
		Convert the frame in binary form
 Tags:
	
        Parameters:
    
        
   
   
	
	method bitstreamToByte [line 2238]
	
    
    
		array bitstreamToByte(
$bstream, array
$bitstream)
     |   
     |  
 
	
		Convert bitstream to bytes
 Tags:
	
        Parameters:
    
        
   
   
	
	method calcN1N3 [line 1135]
	
    
    
		int calcN1N3(
int
$length)
     |   
     |  
 
	
		calcN1N3
 Tags:
	
        Parameters:
    
        
   
   
	
	method calcParity [line 1736]
	
    
    
		int calcParity(
array
$items)
     |   
     |  
 
	
		calcParity
 Tags:
	
        Parameters:
    
        
   
   
	
	method check [line 1869]
	
    
    
		boolean check(
int
$mode, int
$size, array
$data)
     |   
     |  
 
	
		Validate the input data.
 Tags:
	
        Parameters:
    
        
   
   
	
	method checkModeAn [line 1802]
	
    
    
		boolean checkModeAn(
int
$size, array
$data)
     |   
     |  
 
	
		checkModeAn
 Tags:
	
        Parameters:
    
        
   
   
	
	method checkModeKanji [line 1849]
	
    
    
		boolean checkModeKanji(
int
$size, array
$data)
     |   
     |  
 
	
		checkModeKanji
 Tags:
	
        Parameters:
    
        
   
   
	
	method checkModeNum [line 1754]
	
    
    
		boolean checkModeNum(
int
$size, array
$data)
     |   
     |  
 
	
		checkModeNum
 Tags:
	
        Parameters:
    
        
   
   
	
	method convertData [line 2036]
	
    
    
		array convertData(
array
$items)
     |   
     |  
 
	
		convertData
 Tags:
	
        Parameters:
    
        
   
   
	
	method createBitStream [line 2021]
	
    
    
		array createBitStream(
array
$items)
     |   
     |  
 
	
		createBitStream
 Tags:
	
        Parameters:
    
        
   
   
	
	method createFrame [line 2541]
	
    
    
		Array createFrame(
int
$version)
     |   
     |  
 
	
		Return a copy of initialized frame.
 Tags:
	
        Parameters:
    
        
   
   
	
	method eat8 [line 1404]
	
   
	
	method eatAn [line 1352]
	
   
	
	method eatKanji [line 1391]
	
   
	
	method eatNum [line 1320]
	
   
	
	method encodeBitStream [line 1650]
	
    
    
		array encodeBitStream(
array
$inputitem, int
$version)
     |   
     |  
 
	
		encodeBitStream
 Tags:
	
        Parameters:
    
        
   
   
	
	method encodeMask [line 729]
	
    
    
		void encodeMask(
int
$mask)
     |   
     |  
 
	
		Encode mask
 Tags:
	
        Parameters:
    
        
   
   
	
	method encodeMode8 [line 1596]
	
    
    
		array encodeMode8(
array
$inputitem, int
$version)
     |   
     |  
 
	
		encodeMode8
 Tags:
	
        Parameters:
    
        
   
   
	
	method encodeModeAn [line 1573]
	
    
    
		array encodeModeAn(
array
$inputitem, int
$version)
     |   
     |  
 
	
		encodeModeAn
 Tags:
	
        Parameters:
    
        
   
   
	
	method encodeModeKanji [line 1612]
	
    
    
		array encodeModeKanji(
array
$inputitem, int
$version)
     |   
     |  
 
	
		encodeModeKanji
 Tags:
	
        Parameters:
    
        
   
   
	
	method encodeModeNum [line 1544]
	
    
    
		array encodeModeNum(
array
$inputitem, int
$version)
     |   
     |  
 
	
		encodeModeNum
 Tags:
	
        Parameters:
    
        
   
   
	
	method encodeModeStructure [line 1635]
	
    
    
		array encodeModeStructure(
array
$inputitem)
     |   
     |  
 
	
		encodeModeStructure
 Tags:
	
        Parameters:
    
        
   
   
	
	method encodeString [line 713]
	
    
    
		void encodeString(
string
$string)
     |   
     |  
 
	
		Encode the input string to QR code
 Tags:
	
        Parameters:
    
        
   
   
	
	method encode_rs_char [line 2839]
	
    
    
		parity encode_rs_char(
array
$rs, array
$data, array
$parity)
     |   
     |  
 
	
		Encode a Reed-Solomon codec and returns the parity array
 Tags:
	
        Parameters:
    
        
   
   
	
	method estimateBitsMode8 [line 1830]
	
    
    
		int estimateBitsMode8(
int
$size)
     |   
     |  
 
	
		estimateBitsMode8
 Tags:
	
        Parameters:
    
        
   
   
	
	method estimateBitsModeAn [line 1816]
	
    
    
		int estimateBitsModeAn(
int
$size)
     |   
     |  
 
	
		estimateBitsModeAn
 Tags:
	
        Parameters:
    
        
   
   
	
	method estimateBitsModeKanji [line 1839]
	
    
    
		int estimateBitsModeKanji(
int
$size)
     |   
     |  
 
	
		estimateBitsModeKanji
 Tags:
	
        Parameters:
    
        
   
   
	
	method estimateBitsModeNum [line 1768]
	
    
    
		int estimateBitsModeNum(
int
$size)
     |   
     |  
 
	
		estimateBitsModeNum
 Tags:
	
        Parameters:
    
        
   
   
	
	method estimateBitStreamSize [line 1902]
	
    
    
		int estimateBitStreamSize(
array
$items, int
$version)
     |   
     |  
 
	
		estimateBitStreamSize
 Tags:
	
        Parameters:
    
        
   
   
	
	method estimateVersion [line 1945]
	
    
    
		int estimateVersion(
array
$items)
     |   
     |  
 
	
		estimateVersion
 Tags:
	
        Parameters:
    
        
   
   
	
	method evaluateSymbol [line 1166]
	
    
    
		int evaluateSymbol(
int
$width, array
$frame)
     |   
     |  
 
	
		evaluateSymbol
 Tags:
	
        Parameters:
    
        
   
   
	
	method generateMaskNo [line 1072]
	
    
    
		array generateMaskNo(
int
$maskNo, int
$width, array
$frame)
     |   
     |  
 
	
		Return bitmask
 Tags:
	
        Parameters:
    
        
   
   
	
	method getBarcodeArray [line 689]
	
    
	
		Returns a barcode array which is readable by TCPDF
 Tags:
	
        
   
   
	
	method getBitStream [line 2115]
	
    
    
		array getBitStream(
int
$items)
     |   
     |  
 
	
		Returns a stream of bits.
 Tags:
	
        Parameters:
    
        
   
   
	
	method getByteStream [line 2125]
	
    
    
		array getByteStream(
int
$items)
     |   
     |  
 
	
		Pack all bit streams padding bits into a byte array.
 Tags:
	
        Parameters:
    
        
   
   
	
	method getCode [line 918]
	
    
	
		Return Reed-Solomon block code.
 Tags:
	
        
   
   
	
	method getDataLength [line 2294]
	
    
    
		int getDataLength(
int
$version, int
$level)
     |   
     |  
 
	
		Return maximum data code length (bytes) for the version.
 Tags:
	
        Parameters:
    
        
   
   
	
	method getECCLength [line 2304]
	
    
    
		int getECCLength(
int
$version, int
$level)
     |   
     |  
 
	
		Return maximum error correction code length (bytes) for the version.
 Tags:
	
        Parameters:
    
        
   
   
	
	method getEccSpec [line 2394]
	
    
    
		array getEccSpec(
int
$version, int
$level, array
$spec)
     |   
     |  
 
	
		Return an array of ECC specification.
 Tags:
	
        Parameters:
    
        
   
   
	
	method getFormatInfo [line 2502]
	
    
    
		BCH getFormatInfo(
array
$mask, int
$level)
     |   
     |  
 
	
		Return BCH encoded format information pattern.
 Tags:
	
        Parameters:
    
        
   
   
	
	method getFrameAt [line 803]
	
    
    
		value getFrameAt(
array
$at)
     |   
     |  
 
	
		Get frame value at specified position
 Tags:
	
        Parameters:
    
        
   
   
	
	method getMinimumVersion [line 2332]
	
    
    
		int getMinimumVersion(
int
$size, int
$level)
     |   
     |  
 
	
		Return a version number that satisfies the input code length.
 Tags:
	
        Parameters:
    
        
   
   
	
	method getNextPosition [line 811]
	
    
	
		Return the next frame position
 Tags:
	
        
   
   
	
	method getRemainder [line 2322]
	
    
    
		int getRemainder(
int
$version)
     |   
     |  
 
	
		Return the numer of remainder bits.
 Tags:
	
        Parameters:
    
        
   
   
	
	method getVersionPattern [line 2489]
	
    
    
		BCH getVersionPattern(
int
$version)
     |   
     |  
 
	
		Return BCH encoded version information pattern that is used for the symbol of version 7 or greater. Use lower 18 bits.
 Tags:
	
        Parameters:
    
        
   
   
	
	method getWidth [line 2313]
	
    
    
		int getWidth(
int
$version)
     |   
     |  
 
	
		Return the width of the symbol for the version.
 Tags:
	
        Parameters:
    
        
   
   
	
	method identifyMode [line 1295]
	
    
    
		int identifyMode(
int
$pos)
     |   
     |  
 
	
		identifyMode
 Tags:
	
        Parameters:
    
        
   
   
	
	method init [line 867]
	
    
	
		Initialize code.
 Tags:
	
        Parameters:
    
        
   
   
	
	method init_rs [line 2714]
	
    
    
		array init_rs(
int
$symsize, int
$gfpoly, int
$fcr, int
$prim, int
$nroots, int
$pad)
     |   
     |  
 
	
		Initialize a Reed-Solomon codec and add it to existing rsitems
 Tags:
	
        Parameters:
    
        
   
   
	
	method init_rs_char [line 2755]
	
    
    
		array init_rs_char(
int
$symsize, int
$gfpoly, int
$fcr, int
$prim, int
$nroots, int
$pad)
     |   
     |  
 
	
		Initialize a Reed-Solomon codec and returns an array of values.
 Tags:
	
        Parameters:
    
        
   
   
	
	method insertStructuredAppendHeader [line 1718]
	
    
    
		array insertStructuredAppendHeader(
array
$items, int
$size, int
$index, int
$parity)
     |   
     |  
 
	
		insertStructuredAppendHeader
 Tags:
	
        Parameters:
    
        
   
   
	
	method isalnumat [line 1283]
	
    
    
		boolean isalnumat(
string
$str, int
$pos)
     |   
     |  
 
	
		Return true if the character at specified position is an alphanumeric character
 Tags:
	
        Parameters:
    
        
   
   
	
	method isdigitat [line 1270]
	
    
    
		boolean isdigitat(
string
$str, int
$pos)
     |   
     |  
 
	
		Return true if the character at specified position is a number
 Tags:
	
        Parameters:
    
        
   
   
	
	method lengthIndicator [line 2348]
	
    
    
		int lengthIndicator(
int
$mode, int
$version)
     |   
     |  
 
	
		Return the size of length indicator for the mode and version.
 Tags:
	
        Parameters:
    
        
   
   
	
	method lengthOfCode [line 1966]
	
    
    
		int lengthOfCode(
int
$mode, int
$version, int
$bits)
     |   
     |  
 
	
		lengthOfCode
 Tags:
	
        Parameters:
    
        
   
   
	
	method lookAnTable [line 1792]
	
    
    
		value lookAnTable(
int
$c)
     |   
     |  
 
	
		Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19).
 Tags:
	
        Parameters:
    
        
   
   
	
	method makeMask [line 1123]
	
    
    
		array makeMask(
int
$width, array
$frame, int
$maskNo, int
$level)
     |   
     |  
 
	
		makeMask
 Tags:
	
        Parameters:
    
        
   
   
	
	method makeMaskNo [line 1096]
	
    
    
		int makeMaskNo(
int
$maskNo, int
$width, int
$s, 
&$d, [boolean
$maskGenOnly = false], int
$d)
     |   
     |  
 
	
		makeMaskNo
 Tags:
	
        Parameters:
    
        
   
   
	
	method mask [line 1228]
	
    
    
		array mask(
int
$width, array
$frame, int
$level)
     |   
     |  
 
	
		mask
 Tags:
	
        Parameters:
    
        
   
   
	
	method mask0 [line 991]
	
    
    
		int mask0(
int
$x, int
$y)
     |   
     |  
 
	
		mask0
 Tags:
	
        Parameters:
    
        
   
   
	
	method mask1 [line 1001]
	
    
    
		int mask1(
int
$x, int
$y)
     |   
     |  
 
	
		mask1
 Tags:
	
        Parameters:
    
        
   
   
	
	method mask2 [line 1011]
	
    
    
		int mask2(
int
$x, int
$y)
     |   
     |  
 
	
		mask2
 Tags:
	
        Parameters:
    
        
   
   
	
	method mask3 [line 1021]
	
    
    
		int mask3(
int
$x, int
$y)
     |   
     |  
 
	
		mask3
 Tags:
	
        Parameters:
    
        
   
   
	
	method mask4 [line 1031]
	
    
    
		int mask4(
int
$x, int
$y)
     |   
     |  
 
	
		mask4
 Tags:
	
        Parameters:
    
        
   
   
	
	method mask5 [line 1041]
	
    
    
		int mask5(
int
$x, int
$y)
     |   
     |  
 
	
		mask5
 Tags:
	
        Parameters:
    
        
   
   
	
	method mask6 [line 1051]
	
    
    
		int mask6(
int
$x, int
$y)
     |   
     |  
 
	
		mask6
 Tags:
	
        Parameters:
    
        
   
   
	
	method mask7 [line 1061]
	
    
    
		int mask7(
int
$x, int
$y)
     |   
     |  
 
	
		mask7
 Tags:
	
        Parameters:
    
        
   
   
	
	method maximumWords [line 2368]
	
    
    
		int maximumWords(
int
$mode, int
$version)
     |   
     |  
 
	
		Return the maximum length for the mode and version.
 Tags:
	
        Parameters:
    
        
   
   
	
	method mergeBitStream [line 2098]
	
    
    
		array mergeBitStream(
$items, array
$bstream)
     |   
     |  
 
	
		mergeBitStream
 Tags:
	
        Parameters:
    
        
   
   
	
	method modnn [line 2737]
	
    
    
		int modnn(
array
$rs, int
$x)
     |   
     |  
 
	
		modnn
 Tags:
	
        Parameters:
    
        
   
   
	
	method newFrame [line 2606]
	
    
    
		Array newFrame(
int
$version)
     |   
     |  
 
	
		Set new frame for the specified version.
 Tags:
	
        Parameters:
    
        
   
   
	
	method newFromBytes [line 2169]
	
    
    
		array newFromBytes(
int
$size, array
$data)
     |   
     |  
 
	
		Return new bitstream from bytes
 Tags:
	
        Parameters:
    
        
   
   
	
	method newFromNum [line 2149]
	
    
    
		array newFromNum(
int
$bits, int
$num)
     |   
     |  
 
	
		Return new bitstream from number
 Tags:
	
        Parameters:
    
        
   
   
	
	method newInputItem [line 1522]
	
    
    
		array newInputItem(
int
$mode, int
$size, array
$data, [array
$bstream = null])
     |   
     |  
 
	
		newInputItem
 Tags:
	
        Parameters:
    
        
   
   
	
	method putAlignmentMarker [line 2426]
	
    
    
		array putAlignmentMarker(
array
$frame, int
$ox, int
$oy, int
$width)
     |   
     |  
 
	
		Put an alignment marker.
 Tags:
	
        Parameters:
    
        
   
   
	
	method putAlignmentPattern [line 2449]
	
    
    
		array putAlignmentPattern(
int
$version, 
$frame, int
$width, array
$fram)
     |   
     |  
 
	
		Put an alignment pattern.
 Tags:
	
        Parameters:
    
        
   
   
	
	method putFinderPattern [line 2520]
	
    
    
		array putFinderPattern(
array
$frame, int
$ox, int
$oy, int
$width)
     |   
     |  
 
	
		Put a finder pattern.
 Tags:
	
        Parameters:
    
        
   
   
	
	method qrstrset [line 2283]
	
    
    
		array qrstrset(
array
$srctab, int
$x, int
$y, string
$repl, [int
$replLen = false])
     |   
     |  
 
	
		Replace a value on the array at the specified position
 Tags:
	
        Parameters:
    
        
   
   
	
	method rsBlockNum [line 2624]
	
    
    
		int rsBlockNum(
array
$spec)
     |   
     |  
 
	
		Return block number 0
 Tags:
	
        Parameters:
    
        
   
   
	
	method rsBlockNum1 [line 2633]
	
    
    
		int rsBlockNum1(
array
$spec)
     |   
     |  
 
	
		Return block number 1
 Tags:
	
        Parameters:
    
        
   
   
	
	method rsBlockNum2 [line 2660]
	
    
    
		int rsBlockNum2(
array
$spec)
     |   
     |  
 
	
		Return block number 2
 Tags:
	
        Parameters:
    
        
   
   
	
	method rsDataCodes1 [line 2642]
	
    
    
		int rsDataCodes1(
array
$spec)
     |   
     |  
 
	
		Return data codes 1
 Tags:
	
        Parameters:
    
        
   
   
	
	method rsDataCodes2 [line 2669]
	
    
    
		int rsDataCodes2(
array
$spec)
     |   
     |  
 
	
		Return data codes 2
 Tags:
	
        Parameters:
    
        
   
   
	
	method rsDataLength [line 2687]
	
    
    
		int rsDataLength(
array
$spec)
     |   
     |  
 
	
		Return data length
 Tags:
	
        Parameters:
    
        
   
   
	
	method rsEccCodes1 [line 2651]
	
    
    
		int rsEccCodes1(
array
$spec)
     |   
     |  
 
	
		Return ecc codes 1
 Tags:
	
        Parameters:
    
        
   
   
	
	method rsEccCodes2 [line 2678]
	
    
    
		int rsEccCodes2(
array
$spec)
     |   
     |  
 
	
		Return ecc codes 2
 Tags:
	
        Parameters:
    
        
   
   
	
	method rsEccLength [line 2696]
	
    
    
		int rsEccLength(
array
$spec)
     |   
     |  
 
	
		Return ecc length
 Tags:
	
        Parameters:
    
        
   
   
	
	method setFrameAt [line 794]
	
    
    
		void setFrameAt(
array
$at, int
$val)
     |   
     |  
 
	
		Set frame value at specified position
 Tags:
	
        Parameters:
    
        
   
   
	
	method splitString [line 1452]
	
   
	
	method toUpper [line 1493]
	
   
	
	method writeFormatInformation [line 949]
	
    
    
		int writeFormatInformation(
int
$width, 
&$frame, array
$mask, int
$level, array
$frame)
     |   
     |  
 
	
		Write Format Information on frame and returns the number of black bits
 Tags:
	
        Parameters:
    
        
   
  
        
       |   
     |