Documentation

Enum

Table of Contents

$name  : string
$names  : array<string, array<int, string>>
__callStatic()  : static
Returns the enum constant of the specified name.
__set()  : void
__toString()  : string
Returns the name of this enum constant, as contained in the declaration.
__wakeup()  : void
equals()  : bool
Returns true if the specified object is equal to this enum constant.
hashCode()  : int
Returns the hash code for this enum constant
name()  : string
Returns the name of this enum constant, exactly as declared in its enum declaration.
ordinal()  : int
Returns the ordinal of this enum constant.
valueOf()  : static
Returns the enum constant of the specified name.
values()  : array<int, static>
Returns all constants of this enum type.
__clone()  : void
__construct()  : mixed
validateInheritance()  : void

Properties

$name

private string $name

$names

private static array<string, array<int, string>> $names = []
Tags
phpstan-var

array<class-string, list>

psalm-var

array<class-string, list>

Methods

__callStatic()

Returns the enum constant of the specified name.

public final static __callStatic(string $name, array<int, mixed> $arguments) : static
Parameters
$name : string
$arguments : array<int, mixed>
Tags
phpstan-param

list $arguments

psalm-param

list $arguments

Return values
static

__set()

public final __set(string $property, mixed $value) : void
Parameters
$property : string
$value : mixed
Return values
void

__toString()

Returns the name of this enum constant, as contained in the declaration.

public __toString() : string
Return values
string

__wakeup()

public final __wakeup() : void
Return values
void

equals()

Returns true if the specified object is equal to this enum constant.

public final equals(object $other) : bool
Parameters
$other : object
Return values
bool

hashCode()

Returns the hash code for this enum constant

public final hashCode() : int
Return values
int

name()

Returns the name of this enum constant, exactly as declared in its enum declaration.

public final name() : string
Return values
string

ordinal()

Returns the ordinal of this enum constant.

public final ordinal() : int

Its position in its enum declaration, where the initial constant is assigned an ordinal of zero.

Return values
int

valueOf()

Returns the enum constant of the specified name.

public final static valueOf(string $name) : static
Parameters
$name : string
Return values
static

values()

Returns all constants of this enum type.

public final static values() : array<int, static>
Tags
phpstan-return

list

psalm-return

list

Return values
array<int, static>

__clone()

protected final __clone() : void
Return values
void

__construct()

private final __construct(string $name) : mixed
Parameters
$name : string
Return values
mixed

validateInheritance()

private static validateInheritance() : void
Return values
void

Search results