final class Nodes implements IteratorAggregate, ArrayAccess, Countable (View source)

An immutable, type-safe collection of Node objects

Methods

static Nodes
fromArray(array $nodes)

No description

static Nodes
createEmpty()

No description

Node|null
offsetGet(mixed $offset)

No description

getIterator()

No description

bool
offsetExists(mixed $offset)

No description

never
offsetSet(mixed $offset, mixed $value)

No description

never
offsetUnset(mixed $offset)

No description

int
count()

No description

Node|null
first()

No description

merge(Nodes $other)

No description

reverse()

No description

bool
isEmpty()

No description

Node|null
previous(Node $referenceNode)

Returns the node before the given $referenceNode in this set.

previousAll(Node $referenceNode)

Returns all nodes before the given $referenceNode in this set

Node|null
next(Node $referenceNode)

Returns the node after the given $referenceNode in this set.

nextAll(Node $referenceNode)

Returns all nodes after the given $referenceNode in this set

until(Node $referenceNode)

Returns all nodes after the given $referenceNode in this set

Details

static Nodes fromArray(array $nodes)

No description

Parameters

array $nodes

Return Value

Nodes

static Nodes createEmpty()

No description

Return Value

Nodes

Node|null offsetGet(mixed $offset)

No description

Parameters

mixed $offset

Return Value

Node|null

ArrayIterator getIterator()

No description

Return Value

ArrayIterator

bool offsetExists(mixed $offset)

No description

Parameters

mixed $offset

Return Value

bool

never offsetSet(mixed $offset, mixed $value)

No description

Parameters

mixed $offset
mixed $value

Return Value

never

never offsetUnset(mixed $offset)

No description

Parameters

mixed $offset

Return Value

never

int count()

No description

Return Value

int

Node|null first()

No description

Return Value

Node|null

Nodes merge(Nodes $other)

No description

Parameters

Nodes $other

Return Value

Nodes

Nodes reverse()

No description

Return Value

Nodes

bool isEmpty()

No description

Return Value

bool

Node|null previous(Node $referenceNode)

Returns the node before the given $referenceNode in this set.

Throws an exception if $referenceNode does not exist. Returns NULL if $referenceNode has no preceding sibling

Parameters

Node $referenceNode

Return Value

Node|null

Nodes previousAll(Node $referenceNode)

Returns all nodes before the given $referenceNode in this set

Parameters

Node $referenceNode

Return Value

Nodes

Node|null next(Node $referenceNode)

Returns the node after the given $referenceNode in this set.

Throws an exception if $referenceNode does not exist. Returns NULL if $referenceNode has no following sibling

Parameters

Node $referenceNode

Return Value

Node|null

Nodes nextAll(Node $referenceNode)

Returns all nodes after the given $referenceNode in this set

Parameters

Node $referenceNode

Return Value

Nodes

Nodes until(Node $referenceNode)

Returns all nodes after the given $referenceNode in this set

Parameters

Node $referenceNode

Return Value

Nodes