PropertyNode
interface PropertyNode (View source)
Parser-agnostic interface for property AST nodes.
Exposes all property attributes needed for complete parsing.
Methods
Get the property name.
Check if the property is public.
Check if the property is protected.
Check if the property is private.
Check if the property is static.
Check if the property is readonly (PHP 8.1+).
Get the doc comment, or null if no doc comment.
Get the property attributes (PHP 8.0+).
Details
string
getName()
Get the property name.
bool
isPublic()
Check if the property is public.
bool
isProtected()
Check if the property is protected.
bool
isPrivate()
Check if the property is private.
bool
isStatic()
Check if the property is static.
bool
isReadonly()
Check if the property is readonly (PHP 8.1+).
TypeNode|null
getType()
Get the property type, or null if no type hint.
DocCommentNode|null
getDocComment()
Get the doc comment, or null if no doc comment.
array
getAttributes()
Get the property attributes (PHP 8.0+).