PHP QrCode Liblary  2.0
 All Classes Functions Variables Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
QRencode Class Reference

QR Code encoder. More...

Public Member Functions

 encodeRAW ($intext, $notused=false)
 Encodes input into Raw code table. More...
 
 encode ($intext, $outfile=false)
 Encodes input into binary code table. More...
 
 encodePNG ($intext, $outfile=false, $saveandprint=false)
 Encodes input into PNG image. More...
 

Static Public Member Functions

static factory ($level=QR_ECLEVEL_L, $size=3, $margin=4)
 Encoder instances factory. More...
 

Public Attributes

 $casesensitive = true
 Boolean does input stream id case sensitive, if not encoder may use more optimal charsets
 
 $eightbit = false
 Boolean does input stream is 8 bit
 
 $version = 0
 Integer code version (total size) if 0 - will be auto-detected
 
 $size = 3
 Integer pixel zoom factor, multiplier to map virtual code pixels to image output pixels
 
 $margin = 4
 Integer margin (silent zone) size, in code pixels
 
 $structured = 0
 Structured QR codes. Not supported.
 
 $level = QR_ECLEVEL_L
 Integer error correction level QR_ECLEVEL_L, QR_ECLEVEL_M, QR_ECLEVEL_Q or QR_ECLEVEL_H
 
 $hint = QR_MODE_8
 Integer encoding hint, QR_MODE_8 or QR_MODE_KANJI, Because Kanji encoding is kind of 8 bit encoding we need to hint encoder to use Kanji mode explicite. (otherwise it may try to encode it as plain 8 bit stream)
 

Detailed Description

QR Code encoder.

Encoder is used by QRCode to create simple static code generators.

Member Function Documentation

QRencode::encode (   $intext,
  $outfile = false 
)

Encodes input into binary code table.

Parameters
String$intextinput text
String$outfile(optional) output file to save code table, if false file will be not saved
Returns
Array binary code frame
QRencode::encodePNG (   $intext,
  $outfile = false,
  $saveandprint = false 
)

Encodes input into PNG image.

Parameters
String$intextinput text
String$outfile(optional) output file name, if false outputs to browser with required headers
Boolean$saveandprint(optional) if true code is outputed to browser and saved to file, otherwise only saved to file. It is effective only if $outfile is specified.
QRencode::encodeRAW (   $intext,
  $notused = false 
)

Encodes input into Raw code table.

Parameters
String$intextinput text
Boolean$notused(optional, not used) placeholder for similar outfile parameter
Returns
Array Raw code frame
static QRencode::factory (   $level = QR_ECLEVEL_L,
  $size = 3,
  $margin = 4 
)
static

Encoder instances factory.

Parameters
Integer$levelerror correction level QR_ECLEVEL_L, QR_ECLEVEL_M, QR_ECLEVEL_Q or QR_ECLEVEL_H
Integer$sizepixel zoom factor, multiplier to map virtual code pixels to image output pixels
Integer$marginmargin (silent zone) size, in code pixels
Returns
builded QRencode instance

The documentation for this class was generated from the following file: