X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2FTitleArray.php;h=bf2344bbb7717f93089c3e6f47d8ae3050dc2154;hb=55c51f36a4869614d870dac5d870638ec58a95ff;hp=cc130d253bb5a809149deba10c1a07123303bf95;hpb=32234445e06df7ba8f7508b16feff0a58d346348;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/TitleArray.php b/includes/TitleArray.php index cc130d253b..bf2344bbb7 100644 --- a/includes/TitleArray.php +++ b/includes/TitleArray.php @@ -1,6 +1,6 @@ res = $res; - $this->key = 0; - $this->setCurrent( $this->res->current() ); - } - - /** - * @param $row ResultWrapper - * @return void - */ - protected function setCurrent( $row ) { - if ( $row === false ) { - $this->current = false; - } else { - $this->current = Title::newFromRow( $row ); - } - } - - /** - * @return int - */ - public function count() { - return $this->res->numRows(); - } - - 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() ); - } - - /** - * @return bool - */ - function valid() { - return $this->current !== false; - } -}