\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 : int

Number of EC codewords per block.

Type

int

$ecBlocks

$ecBlocks : \SplFixedArray

List of EC blocks.

Type

\SplFixedArray —

Methods

__construct()

__construct(int  $ecCodewordsPerBlock, \BaconQrCode\Common\EcBlock  $ecb1, \BaconQrCode\Common\EcBlock|null  $ecb2 = null) : mixed

Creates a new EC blocks instance.

Parameters

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

Returns

mixed —

getEcCodewordsPerBlock()

getEcCodewordsPerBlock() : int

Gets the number of EC codewords per block.

Returns

int —

getNumBlocks()

getNumBlocks() : int

Gets the total number of EC block appearances.

Returns

int —

getTotalEcCodewords()

getTotalEcCodewords() : int

Gets the total count of EC codewords.

Returns

int —

getEcBlocks()

getEcBlocks() : \SplFixedArray

Gets the EC blocks included in this collection.

Returns

\SplFixedArray —