/** * get book at current index * * @return Object */ public function next() { /** @var Book $book */ $book = $this->bookShelf->getBookAt($this->index); $this->index++; return $book; }
/** * @return Object */ public function next() { $book = $this->bookShelf->getBookAt($this->index); $this->index--; return $book; }