RedBeanPHP\Cursor::getNextItem PHP Метод

getNextItem() публичный Метод

This method is used to iterate over the result set.
public getNextItem ( ) : array
Результат array
    public function getNextItem();

Usage Example

Пример #1
0
 /**
  * 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 OODBBean|NULL
  */
 public function next()
 {
     $row = $this->cursor->getNextItem();
     if ($row) {
         $beans = $this->repository->convertToBeans($this->type, array($row));
         $bean = array_shift($beans);
         return $bean;
     }
     return NULL;
 }