NikicPropertyNode
class NikicPropertyNode implements PropertyNode (View source)
Adapter for nikic/php-parser PropertyProperty nodes.
Implements complete PropertyNode interface. Requires both PropertyProperty (for name) and Property statement (for modifiers/type).
Methods
No description
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
__construct(PropertyProperty $property, Property $propertyStmt)
No description
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+).