X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FTitleArray.php;h=b67d9f4d67e59711e4b808dafe61e76d624abffc;hb=911d50b022587b966fadf8374b7bd739b7830732;hp=cc130d253bb5a809149deba10c1a07123303bf95;hpb=aa5e15357aab7365815c154fd86bdaa6f968b97a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/TitleArray.php b/includes/TitleArray.php index cc130d253b..b67d9f4d67 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; - } -}