ReflectionConstant
class ReflectionConstant implements Reflector (View source)
The ReflectionConstant class reports information about a global constant.
Properties
| string | $name |
Methods
Constructs a ReflectionConstant
Gets name
Gets namespace name
Gets short name
Gets value
Checks if deprecated
Returns string representation
Gets name of the defining file
Gets ReflectionExtension of the defining extension
Gets name of the defining extension
Gets Attributes
No description
Details
__construct(string $name)
Constructs a ReflectionConstant
Constructs a new ReflectionConstant object.
string
getName()
Gets name
Gets the name of the constant.
string
getNamespaceName()
Gets namespace name
Gets the namespace name of the constant.
string
getShortName()
Gets short name
Gets the short name of the constant, the part without the namespace.
mixed
getValue()
Gets value
Gets the value of the constant.
bool
isDeprecated()
Checks if deprecated
Checks whether the constant is deprecated.
string
__toString()
Returns string representation
Returns the string representation of the ReflectionConstant object.
string|false
getFileName()
Gets name of the defining file
Gets the filename of the file in which the constant has been defined.
ReflectionExtension|null
getExtension()
Gets ReflectionExtension of the defining extension
Gets a ReflectionExtension object for the extension which defined the constant.
string|false
getExtensionName()
Gets name of the defining extension
Gets the name of the extension which defined the constant.
array
getAttributes(string|null $name = null, int $flags = 0)
Gets Attributes
Returns all attributes declared on this global constant as an array of ReflectionAttribute.
bool
inNamespace()
No description