\BaconQrCode\CommonErrorCorrectionLevel

Enum representing the four error correction levels.

Summary

Methods
Properties
Constants
__construct()
change()
get()
getConstList()
__toString()
getOrdinal()
No public properties found
__default
L
M
Q
H
No protected methods found
$value
$constants
$strict
N/A
No private methods found
No private properties found
N/A

Constants

__default

__default = null

Default value.

L

L = 1

Level L, ~7% correction.

M

M = 0

Level M, ~15% correction.

Q

Q = 3

Level Q, ~25% correction.

H

H = 2

Level H, ~30% correction.

Properties

$value

$value : mixed

Current value.

Type

mixed

$constants

$constants : array

Cache of constants.

Type

array

$strict

$strict : boolean

Whether to handle values strict or not.

Type

boolean

Methods

__construct()

__construct(mixed  $initialValue = null, boolean  $strict = false) 

Creates a new enum.

Parameters

mixed $initialValue
boolean $strict

change()

change(mixed  $value) : void

Changes the value of the enum.

Parameters

mixed $value

get()

get() : mixed

Gets current value.

Returns

mixed

getConstList()

getConstList(boolean  $includeDefault = true) : array

Gets all constants (possible values) as an array.

Parameters

boolean $includeDefault

Returns

array

__toString()

__toString() : string

Gets the name of the enum.

Returns

string

getOrdinal()

getOrdinal() : integer

Gets the ordinal of this enumeration constant.

Returns

integer