ReflectionClassConstant
class ReflectionClassConstant implements Reflector (View source)
The ReflectionClassConstant class reports information about a class constant.
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 | ||
string | $class | ||
bool
Since: 8.1
|
$isFinal |
Methods
ReflectionClassConstant constructor.
No description
Gets declaring class
Gets doc comments
Gets the class constant modifiers
Get name of the constant
Gets value
Checks if class constant is private
Checks if class constant is protected
Checks if class constant is public
Returns the string representation of the ReflectionClassConstant object.
No description
No description
No description
No description
No description
No description
Details
__construct(string|object $class, string $constant)
ReflectionClassConstant constructor.
static string|null
export(string|object $class, string $name, bool $return = false)
No description
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 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
ReflectionType|null
getType()
No description
bool
isDeprecated()
No description