\BaconQrCode\CommonEcBlocks

Encapsulates a set of error-correction blocks in one symbol version. Most versions will use blocks of differing sizes within one version, so, this encapsulates the parameters for each set of blocks. It also holds the number of error-correction codewords per block since it will be the same across all blocks within one version.

Summary

Methods
Properties
Constants
__construct()
getEcCodewordsPerBlock()
getNumBlocks()
getTotalEcCodewords()
getEcBlocks()
No public properties found
No constants found
No protected methods found
$ecCodewordsPerBlock
$ecBlocks
N/A
No private methods found
No private properties found
N/A

Properties

$ecCodewordsPerBlock

$ecCodewordsPerBlock : integer

Number of EC codewords per block.

Type

integer

$ecBlocks

$ecBlocks : \SplFixedArray

List of EC blocks.

Type

\SplFixedArray

Methods

__construct()

__construct(integer  $ecCodewordsPerBlock, \BaconQrCode\Common\EcBlock  $ecb1, \BaconQrCode\Common\EcBlock|null  $ecb2 = null) 

Creates a new EC blocks instance.

Parameters

integer $ecCodewordsPerBlock
\BaconQrCode\Common\EcBlock $ecb1
\BaconQrCode\Common\EcBlock|null $ecb2

getEcCodewordsPerBlock()

getEcCodewordsPerBlock() : integer

Gets the number of EC codewords per block.

Returns

integer

getNumBlocks()

getNumBlocks() : integer

Gets the total number of EC block appearances.

Returns

integer

getTotalEcCodewords()

getTotalEcCodewords() : integer

Gets the total count of EC codewords.

Returns

integer

getEcBlocks()

getEcBlocks() : \SplFixedArray

Gets the EC blocks included in this collection.

Returns

\SplFixedArray