extends |
ClassMemberReflection, ConstantReflection |
|---|
Reflection for a class constant. Combines ClassMemberReflection (declaring class, visibility) with ConstantReflection (name, value type, deprecation) and adds class-constant-specific features: the value expression AST, final modifier, and separate PHPDoc/native types. PHP 8.3+ supports native type declarations on class constants, so this interface provides both PHPDoc and native type accessors (similar to property reflection). This is the return type of Type::getConstant() and Scope::getConstantReflection().
| Methods | ||
|---|---|---|
public
|
getValueExpr(): Expr
|
# |
public
|
isFinal(): bool
|
# |
public
|
hasPhpDocType(): bool
|
# |
public
|
getPhpDocType(): ?Type
|
# |
public
|
hasNativeType(): bool
|
# |
public
|
getNativeType(): ?Type
|
# |
public
|
getResolvedPhpDoc(): ?ResolvedPhpDocBlock
|
# |
| Methods inherited from PHPStan\Reflection\ClassMemberReflection |
|---|
getDeclaringClass(), isStatic(), isPrivate(), isPublic(), getDocComment() |
| Methods inherited from PHPStan\Reflection\ConstantReflection |
|---|
getName(), getValueType(), isDeprecated(), getDeprecatedDescription(), isInternal(), getFileName(), getAttributes() |