Documentation

RuleWatchChain extends SplDoublyLinkedList
in package

An extension of SplDoublyLinkedList with seek and removal of current element

SplDoublyLinkedList only allows deleting a particular offset and has no method to set the internal iterator to a particular offset.

Tags
author

Nils Adermann naderman@naderman.de

Table of Contents

$offset  : mixed
remove()  : mixed
Removes the current element from the list
seek()  : mixed
Moves the internal iterator to the specified offset

Properties

Methods

remove()

Removes the current element from the list

public remove() : mixed

As SplDoublyLinkedList only allows deleting a particular offset and incorrectly sets the internal iterator if you delete the current value this method sets the internal iterator back to the following element using the seek method.

Return values
mixed

seek()

Moves the internal iterator to the specified offset

public seek(int $offset) : mixed
Parameters
$offset : int

The offset to seek to.

Return values
mixed

Search results