\Zxing\CommonAbstractEnum

A general enum implementation until we got SplEnum.

Summary

Methods
Properties
Constants
__construct()
change()
getConstList()
get()
__toString()
No public properties found
__default
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.

Properties

$value

$value : mixed

Current value.

Type

mixed

$constants

$constants : array

Cache of constants.

Type

array

$strict

$strict : bool

Whether to handle values strict or not.

Type

bool

Methods

__construct()

__construct(mixed  $initialValue = null, bool  $strict = false) : mixed

Creates a new enum.

Parameters

mixed $initialValue
bool $strict

Returns

mixed —

change()

change(mixed  $value) : void

Changes the value of the enum.

Parameters

mixed $value

getConstList()

getConstList(bool  $includeDefault = true) : array

Gets all constants (possible values) as an array.

Parameters

bool $includeDefault

Returns

array —

get()

get() : mixed

Gets current value.

Returns

mixed —

__toString()

__toString() : string

Gets the name of the enum.

Returns

string —