ReflectionTypeConstant
This is a point-in-time snapshot of the API documentation from January 2026. Going forward, we will not be maintaining a public copy of these references, and recommend users to refer to the built-in signature helpers available in the Hack LSP instead for complete and up-to-date information.
The ReflectionTypeConstant class reports information about an object
Interface Synopsis
class ReflectionTypeConstant implements Reflector {...}
Public Methods
-
->__construct(mixed $class, string $name)
Constructs a new ReflectionTypeConstant -
->getAssignedTypeText(): ?string
Get the type assigned to this type constant as a string -
->getClass(): ReflectionClass
Gets the class for the reflected type constant -
->getDeclaringClass(): ReflectionClass
Gets the declaring class for the reflected type constant -
->getName(): string
Get the name of the type constant -
->isAbstract(): bool
Checks if the type constant is abstract