EnumSet implements ArrayAccess, Countable, IteratorAggregate
Tags
Interfaces, Classes and Traits
- ArrayAccess
- Countable
- IteratorAggregate
Table of Contents
- $enumMap : EnumMap<Enum, Enum>
- allOf() : EnumSet<string|int, Enum>
- Creates an enum set containing all of the elements in the specified element type.
- count() : int
- getIterator() : Traversable<int, Enum>
- isEmpty() : bool
- Determines if the enum set is empty or not.
- noneOf() : EnumSet<string|int, Enum>
- Creates an empty enum set with the specified element type.
- of() : EnumSet<string|int, Enum>
- Creates an enum set initially containing the specified element.
- offsetExists() : bool
- offsetGet() : Enum|null
- offsetSet() : void
- offsetUnset() : void
- range() : EnumSet<string|int, Enum>
- Creates an enum set initially containing all of the elements in the range defined by the two specified endpoints.
- toArray() : array<int, Enum>
- Gets the enum set of values as a plain array.
- __construct() : mixed
- validateEnum() : void
Properties
$enumMap
private
EnumMap<Enum, Enum>
$enumMap
Tags
Methods
allOf()
Creates an enum set containing all of the elements in the specified element type.
public
static allOf(string $class) : EnumSet<string|int, Enum>
Parameters
- $class : string
Tags
Return values
EnumSet<string|int, Enum> —count()
public
count() : int
Tags
Return values
int —getIterator()
public
getIterator() : Traversable<int, Enum>
Tags
Return values
Traversable<int, Enum> —isEmpty()
Determines if the enum set is empty or not.
public
isEmpty() : bool
Return values
bool —noneOf()
Creates an empty enum set with the specified element type.
public
static noneOf(string $class) : EnumSet<string|int, Enum>
Parameters
- $class : string
Tags
Return values
EnumSet<string|int, Enum> —of()
Creates an enum set initially containing the specified element.
public
static of(Enum $enum) : EnumSet<string|int, Enum>
Parameters
- $enum : Enum
Tags
Return values
EnumSet<string|int, Enum> —offsetExists()
public
offsetExists(Enum $key) : bool
Parameters
- $key : Enum
Tags
Return values
bool —offsetGet()
public
offsetGet(Enum $key) : Enum|null
Parameters
- $key : Enum
Tags
Return values
Enum|null —offsetSet()
public
offsetSet(Enum|null $key, Enum $enum) : void
Parameters
Tags
Return values
void —offsetUnset()
public
offsetUnset(Enum $key) : void
Parameters
- $key : Enum
Tags
Return values
void —range()
Creates an enum set initially containing all of the elements in the range defined by the two specified endpoints.
public
static range(Enum $from, Enum $to) : EnumSet<string|int, Enum>
Parameters
Tags
Return values
EnumSet<string|int, Enum> —toArray()
Gets the enum set of values as a plain array.
public
toArray() : array<int, Enum>
Tags
Return values
array<int, Enum> —__construct()
private
__construct(EnumMap<Enum, Enum> $enumMap) : mixed
Parameters
Tags
Return values
mixed —validateEnum()
private
static validateEnum(string $class) : void
Parameters
- $class : string