# Documentation

Menu

## Decoder
in package

FinalYes
Decoder.php : 29

The main class which implements QR Code decoding -- as opposed to locating and extracting the QR Code from an image.

##### Tags

author

  Sean Owen

### Table of Contents

#### Properties

$bitBuffer : BitBuffer
$detector : Detector
$eccLevel : EccLevel|null
$maskPattern : MaskPattern|null
$options : SettingsContainerInterface|QROptions
$version : Version|null

#### Methods

__construct() : mixed
decode() : DecoderResult
  Decodes a QR Code represented as a BitMatrix.
decodeAlphanumSegment() : string
decodeBitStream() : DecoderResult
  Decode the contents of that stream of bytes
decodeMatrix() : DecoderResult

### Properties

#### $bitBuffer

Decoder.php : 36
`private BitBuffer $bitBuffer`

#### $detector

Decoder.php : 37
`private Detector $detector`

#### $eccLevel

Decoder.php : 34
`private EccLevel|null $eccLevel = null`

#### $maskPattern

Decoder.php : 35
`private MaskPattern|null $maskPattern = null`

#### $options

Decoder.php : 32
`private SettingsContainerInterface|QROptions $options`

##### Tags

noinspection

  PhpPropertyOnlyWrittenInspection (currently unused)

#### $version

Decoder.php : 33
`private Version|null $version = null`

### Methods

#### __construct()

Decoder.php : 39
`public __construct([SettingsContainerInterface|QROptions $options = new QROptions() ]) : mixed`

##### Parameters

$options : SettingsContainerInterface|QROptions = new QROptions()

#### decode()

Decoder.php : 49

Decodes a QR Code represented as a BitMatrix.

`public decode(LuminanceSourceInterface $source) : DecoderResult`

A 1 or "true" is taken to mean a black module.

##### Parameters

$source : LuminanceSourceInterface

##### Tags

throws
  Throwable|QRCodeDecoderException

##### Return values

DecoderResult

#### decodeAlphanumSegment()

Decoder.php : 169
`private decodeAlphanumSegment(int $versionNumber, bool $fc1InEffect) : string`

##### Parameters

$versionNumber : int
$fc1InEffect : bool

##### Return values

string

#### decodeBitStream()

Decoder.php : 103

Decode the contents of that stream of bytes

`private decodeBitStream(BitBuffer $bitBuffer) : DecoderResult`

##### Parameters

$bitBuffer : BitBuffer

##### Tags

throws
  QRCodeDecoderException

##### Return values

DecoderResult

#### decodeMatrix()

Decoder.php : 82
`private decodeMatrix(BitMatrix $matrix) : DecoderResult`

##### Parameters

$matrix : BitMatrix

##### Tags

throws
  QRCodeDecoderException

##### Return values

DecoderResult

## Search results