ClassConstantIterator
in package
implements
Iterator
FinalYes
This class acts like a combination of a ClassConst and Const_ to be able to create constant descriptors using a normal strategy.
Table of Contents
Interfaces
- Iterator
Properties
- $classConstants : ClassConst
- $index : int
Methods
- __construct() : mixed
- Initializes the class with source data.
- current() : self
- getDocComment() : Doc|null
- Gets the doc comment of the node.
- getEndLine() : int
- Gets line the node ended in.
- getFqsen() : Fqsen
- Returns the fqsen of the current constant.
- getLine() : int
- Gets line the node started in.
- getName() : string
- Returns the name of the current constant.
- getValue() : Expr
- isFinal() : bool
- isPrivate() : bool
- returns true when the current property is private.
- isProtected() : bool
- returns true when the current property is protected.
- isPublic() : bool
- returns true when the current property is public.
- key() : int|null
- next() : void
- rewind() : void
- valid() : bool
Properties
$classConstants read-only
private
ClassConst
$classConstants
$index
private
int
$index
= 0
index of the current ClassConst to use
Methods
__construct()
Initializes the class with source data.
public
__construct(ClassConst $classConstants) : mixed
Parameters
- $classConstants : ClassConst
current()
public
current() : self
Tags
Attributes
- #[Override]
Return values
selfgetDocComment()
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 ended in.
public
getEndLine() : int
Return values
int —Line
getFqsen()
Returns the fqsen of the current constant.
public
getFqsen() : Fqsen
Return values
FqsengetLine()
Gets line the node started in.
public
getLine() : int
Return values
int —Line
getName()
Returns the name of the current constant.
public
getName() : string
Return values
stringgetValue()
public
getValue() : Expr
Return values
ExprisFinal()
public
isFinal() : bool
Return values
boolisPrivate()
returns true when the current property is private.
public
isPrivate() : bool
Return values
boolisProtected()
returns true when the current property is protected.
public
isProtected() : bool
Return values
boolisPublic()
returns true when the current property is public.
public
isPublic() : 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]