/** * (PHP 5 >= 5.0.0)<br/> * Checks if current position is valid * @link http://php.net/manual/en/iterator.valid.php * @return boolean The return value will be casted to boolean and then evaluated. * Returns true on success or false on failure. */ public function valid() { return null !== $this->bookList->getBook($this->currentBook); }
/** * Return the current book * @link http://php.net/manual/en/iterator.current.php * @return Book Can return any type. */ public function current() { return $this->bookList->getBook($this->currentBook); }