X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FTitleArray.php;h=0fb5b1e96ba06f428f866cbecedc23228a1f0d5b;hb=2a39ed874a9173b6b2806991f0aa90498239b5ef;hp=5cdec16d347ff1332dd8970ad0aa659d3348931a;hpb=6e49b1a96613f1c1b52a21219098d6eafc0d34f6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/TitleArray.php b/includes/TitleArray.php index 5cdec16d34..0fb5b1e96b 100644 --- a/includes/TitleArray.php +++ b/includes/TitleArray.php @@ -1,10 +1,10 @@ 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; - } -}