PropertyIterator
in package
implements
Iterator
This class acts like a combination of a PropertyNode and PropertyProperty to be able to create property descriptors using a normal strategy.
Table of Contents
Interfaces
- Iterator
Properties
Methods
- __construct() : mixed
- Instantiates this iterator with the propertyNode to iterate.
- current() : self
- getDefault() : Expr|null
- returns the default value of the current property.
- getDocComment() : Doc|null
- Gets the doc comment of the node.
- getEndLine() : int
- Gets line the node started in.
- getFqsen() : Fqsen
- Returns the fqsen of the current property.
- getHooks() : array<string|int, PropertyHook>
- getLine() : int
- Gets line the node started in.
- getName() : string
- returns the name of the current property.
- getType() : Identifier|Name|ComplexType|null
- Gets the type of the property.
- isAsymmetric() : bool
- Returns true when current property has asymetric accessors.
- isPrivate() : bool
- returns true when the current property is private.
- isPrivateSet() : bool
- Returns asymetric accessor value for current property.
- isProtected() : bool
- returns true when the current property is protected.
- isProtectedSet() : bool
- Returns asymetric accessor value for current property.
- isPublic() : bool
- returns true when the current property is public.
- isPublicSet() : bool
- Returns asymmetric accessor value for current property.
- isReadOnly() : bool
- returns true when the current property is readonly.
- isStatic() : bool
- returns true when the current property is static.
- key() : int|null
- next() : void
- rewind() : void
- valid() : bool
Properties
$index
private
int
$index
= 0
index of the current propertyProperty to use
$property read-only
private
Property
$property
Methods
__construct()
Instantiates this iterator with the propertyNode to iterate.
public
__construct(Property $property) : mixed
Parameters
- $property : Property
current()
public
current() : self
Tags
Attributes
- #[Override]
Return values
selfgetDefault()
returns the default value of the current property.
public
getDefault() : Expr|null
Return values
Expr|nullgetDocComment()
Gets the doc comment of the node.
public
getDocComment() : Doc|null
The doc comment has to be the last comment associated with the node.
Return values
Doc|nullgetEndLine()
Gets line the node started in.
public
getEndLine() : int
Return values
intgetFqsen()
Returns the fqsen of the current property.
public
getFqsen() : Fqsen
Return values
FqsengetHooks()
public
getHooks() : array<string|int, PropertyHook>
Return values
array<string|int, PropertyHook>getLine()
Gets line the node started in.
public
getLine() : int
Return values
intgetName()
returns the name of the current property.
public
getName() : string
Return values
stringgetType()
Gets the type of the property.
public
getType() : Identifier|Name|ComplexType|null
Return values
Identifier|Name|ComplexType|nullisAsymmetric()
Returns true when current property has asymetric accessors.
public
isAsymmetric() : bool
This method will always return false when your phpparser version is < 5.2
Return values
boolisPrivate()
returns true when the current property is private.
public
isPrivate() : bool
Return values
boolisPrivateSet()
Returns asymetric accessor value for current property.
public
isPrivateSet() : bool
This method will return the same value as self::isPrivate() when your phpparser version is < 5.2
Return values
boolisProtected()
returns true when the current property is protected.
public
isProtected() : bool
Return values
boolisProtectedSet()
Returns asymetric accessor value for current property.
public
isProtectedSet() : bool
This method will return the same value as self::isProtected() when your phpparser version is < 5.2
Return values
boolisPublic()
returns true when the current property is public.
public
isPublic() : bool
Return values
boolisPublicSet()
Returns asymmetric accessor value for current property.
public
isPublicSet() : bool
This method will return the same value as self::isPublic() when your phpparser version is < 5.2
Return values
boolisReadOnly()
returns true when the current property is readonly.
public
isReadOnly() : bool
Return values
boolisStatic()
returns true when the current property is static.
public
isStatic() : bool
Return values
boolkey()
public
key() : int|null
Tags
Attributes
- #[Override]
Return values
int|nullnext()
public
next() : void
Tags
Attributes
- #[Override]
rewind()
public
rewind() : void
Tags
Attributes
- #[Override]
valid()
public
valid() : bool
Tags
Attributes
- #[Override]