ReflectionEnumBackedCase
class ReflectionEnumBackedCase extends ReflectionEnumUnitCase (View source)
The ReflectionEnumBackedCase class reports information about an Enum backed case, which has a scalar equivalent.
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 | |
| class-string | $class | from ReflectionClassConstant | |
|
bool
Since: 8.1
|
$isFinal | from ReflectionClassConstant |
Methods
Instantiates a ReflectionEnumBackedCase object
Export
Gets the enum case object described by this reflection object
Returns the string representation of the ReflectionClassConstant object.
Gets Attributes
Gets the scalar value backing this Enum case
Details
__construct(class-string|object $class, string $constant)
Instantiates a ReflectionEnumBackedCase object
static string|null
export(string|object $class, string $name, bool $return = false)
Export
Exports a reflection.
ReflectionClass
getDeclaringClass()
Gets declaring class
string|false
getDocComment()
Gets doc comments
int
getModifiers()
Gets the class constant modifiers
string
getName()
Get name of the constant
mixed
getValue()
Gets the enum case object described by this reflection object
Returns the enum case object described by this reflection object.
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)
Gets Attributes
Returns all attributes declared on this class constant as an array of ReflectionAttribute.
bool
isEnumCase()
Checks if class constant is an Enum case
Checks if the class constant is an Enum case.
bool
isFinal()
Checks if class constant is final
Checks if the class constant is final.
bool
hasType()
Checks if class constant has a type
Checks if the class constant has a type associated with it.
ReflectionType|null
getType()
Gets a class constant's type
Gets the associated type of a class constant.
bool
isDeprecated()
Checks if deprecated
Checks whether the class constant is deprecated.
ReflectionEnum
getEnum()
Gets the reflection of the enum of this case
int|string
getBackingValue()
Gets the scalar value backing this Enum case