Since: 8.1

class ReflectionEnumBackedCase extends ReflectionEnumUnitCase (View source)

Constants

IS_PUBLIC Since: 8.0

Indicates that the constant is public.

IS_PROTECTED Since: 8.0

Indicates that the constant is protected.

IS_PRIVATE Since: 8.0

Indicates that the constant is private.

IS_FINAL Since: 8.1

Properties

string $name from  ReflectionClassConstant
string $class from  ReflectionClassConstant
bool Since: 8.1
$isFinal from  ReflectionClassConstant

Methods

__construct(string|object $class, string $constant)

ReflectionClassConstant constructor.

static string|null
export(string|object $class, string $name, bool $return = false)

No description

string|false
getDocComment()

Gets doc comments

int
getModifiers()

Gets the class constant modifiers

string
getName()

Get name of the constant

mixed
getValue()

Gets value

bool
isPrivate()

Checks if class constant is private

bool
isProtected()

Checks if class constant is protected

bool
isPublic()

Checks if class constant is public

string
__toString()

Returns the string representation of the ReflectionClassConstant object.

array
getAttributes(string|null $name = null, int $flags = 0)

No description

bool
isEnumCase()

No description

bool
isFinal()

No description

bool
hasType()

No description

getType()

No description

bool
isDeprecated()

No description

int|string
getBackingValue()

No description

Details

__construct(string|object $class, string $constant)

ReflectionClassConstant constructor.

Parameters

string|object $class

Either a string containing the name of the class to reflect, or an object.

string $constant

The name of the class constant.

static string|null export(string|object $class, string $name, bool $return = false)

Since: 7.1

No description

Parameters

string|object $class

The reflection to export.

string $name

The class constant name.

bool $return

Setting to {\true} will return the export, as opposed to emitting it. Setting to {\false} (the default) will do the opposite.

Return Value

string|null

ReflectionClass getDeclaringClass()

Since: 7.1

Gets declaring class

Return Value

ReflectionClass

string|false getDocComment()

Since: 7.1

Gets doc comments

Return Value

string|false

The doc comment if it exists, otherwise {\false}

int getModifiers()

Since: 7.1

Gets the class constant modifiers

Return Value

int

A numeric representation of the modifiers. The actual meanings of these modifiers are described in the predefined constants.

string getName()

Since: 7.1

Get name of the constant

Return Value

string

Returns the constant's name.

mixed getValue()

Gets value

Return Value

mixed

The value of the class constant.

bool isPrivate()

Since: 7.1

Checks if class constant is private

Return Value

bool

bool isProtected()

Since: 7.1

Checks if class constant is protected

Return Value

bool

bool isPublic()

Since: 7.1

Checks if class constant is public

Return Value

bool

string __toString()

Since: 7.1

Returns the string representation of the ReflectionClassConstant object.

Return Value

string

Returns string representation of the object that implements this interface (and/or "__toString" magic method).

array getAttributes(string|null $name = null, int $flags = 0)

Since: 8.0

No description

Parameters

string|null $name

Name of an attribute class

int $flags

Сriteria by which the attribute is searched.

Return Value

array

bool isEnumCase()

No description

Return Value

bool

bool isFinal()

Since: 8.1

No description

Return Value

bool

bool hasType()

Since: 8.3

No description

Return Value

bool

ReflectionType|null getType()

Since: 8.3

No description

Return Value

ReflectionType|null

bool isDeprecated()

Since: 8.4

No description

Return Value

bool

ReflectionEnum getEnum()

No description

Return Value

ReflectionEnum

int|string getBackingValue()

No description

Return Value

int|string