Added Countable and SeekableIterator to DatabaseObjectList
authorAlexander Ebert <ebert@woltlab.com>
Fri, 30 Sep 2011 17:35:31 +0000 (19:35 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 30 Sep 2011 17:35:31 +0000 (19:35 +0200)
commit95b977625d032928abd76a0f3be1690cb421aa0d
tree67e7f2cb46ba5a441ef27c6832eaf3fa10ec5849
parent067fa49e6ff7ced2ea368a440b8f2f432f1f8998
Added Countable and SeekableIterator to DatabaseObjectList

DatabaseObjectList uses an enhanced implementation for Iterators, which is slightly different (see key() implementation) to fit our purposes. Additionally two new methods seekTo() and search() are implemented to provide easier object access.

Thanks to @TimWolla for the suggestion of using SPL interfaces. Closes #206
wcfsetup/install/files/lib/data/DatabaseObjectList.class.php
wcfsetup/install/files/lib/data/ITraversableObject.class.php [new file with mode: 0644]