Documentation

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.

Tags
implements

Iterator<int, PropertyIterator>

Interfaces, Classes and Traits

Iterator

Table of Contents

$index  : int
$property  : Property
__construct()  : mixed
Instantiates this iterator with the propertyNode to iterate.
current()  : self
getDefault()  : string|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.
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.
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.
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

Methods

__construct()

Instantiates this iterator with the propertyNode to iterate.

public __construct(Property $property) : mixed
Parameters
$property : Property
Return values
mixed

getDefault()

returns the default value of the current property.

public getDefault() : string|Expr|null
Return values
string|Expr|null

getDocComment()

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|null

getEndLine()

Gets line the node started in.

public getEndLine() : int
Return values
int

getLine()

Gets line the node started in.

public getLine() : int
Return values
int

getName()

returns the name of the current property.

public getName() : string
Return values
string

isPrivate()

returns true when the current property is private.

public isPrivate() : bool
Return values
bool

isProtected()

returns true when the current property is protected.

public isProtected() : bool
Return values
bool

isPublic()

returns true when the current property is public.

public isPublic() : bool
Return values
bool

isReadOnly()

returns true when the current property is readonly.

public isReadOnly() : bool
Return values
bool

isStatic()

returns true when the current property is static.

public isStatic() : bool
Return values
bool

Search results