From 370e83bb0dfd0c70de268c93bf07ad5ee0897192 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 15 Aug 2008 01:29:47 +0200 Subject: Update auf 1.13.0 --- includes/UserArray.php | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 includes/UserArray.php (limited to 'includes/UserArray.php') diff --git a/includes/UserArray.php b/includes/UserArray.php new file mode 100644 index 00000000..27847e6f --- /dev/null +++ b/includes/UserArray.php @@ -0,0 +1,62 @@ +res = $res; + $this->key = 0; + $this->setCurrent( $this->res->current() ); + } + + protected function setCurrent( $row ) { + if ( $row === false ) { + $this->current = false; + } else { + $this->current = User::newFromRow( $row ); + } + } + + function current() { + return $this->current; + } + + function key() { + return $this->key; + } + + function next() { + $row = $this->res->next(); + $this->setCurrent( $row ); + $this->key++; + } + + function rewind() { + $this->res->rewind(); + $this->key = 0; + $this->setCurrent( $this->res->current() ); + } + + function valid() { + return $this->current !== false; + } +} -- cgit v1.2.3-54-g00ecf