public function next()
    {
        $row = $this->cursor->getNextItem();
        if ($row) {
            $beans = $this->repository->convertToBeans($this->type, array( $row ));
            $bean = array_shift($beans);
            return Model::wrap($bean);
        }
        return null;
    }
public function next()
    {
        $row = $this->cursor->getNextItem();
        if ($row) {
            $beans = $this->repository->convertToBeans($this->type, array( $row ));
            $bean = array_shift($beans);
            return Model::wrap($bean);
        }
        return null;
    }
public function next ( ) { $ row = $ this -> cursor -> getNextItem ( ) ; if ( $ row ) { $ beans = $ this -> repository -> convertToBeans ( $ this -> type , array ( $ row ) ) ; $ bean = array_shift ( $ beans ) ; return Model :: wrap ( $ bean ) ; } return null ; }
Returns the next bean in the collection.
If called the first time, this will return the first bean in the collection.
If there are no more beans left in the collection, this method
will return NULL.

@return Model|NULL
Returns the next bean in the collection . If called the first time this will return the first bean in the collection . If there are no more beans left in the collection this method will return NULL .