コード例 #1
0
ファイル: Cursor.php プロジェクト: im286er/ent
 /**
  * Wrapper method for MongoCursor::getNext().
  *
  * If configured, the result may be a hydrated document class instance.
  *
  * @see \Doctrine\MongoDB\Cursor::getNext()
  * @see http://php.net/manual/en/mongocursor.getnext.php
  * @return array|object|null
  */
 public function getNext()
 {
     $next = $this->baseCursor->getNext();
     if ($next !== null && $this->hydrate) {
         return $this->unitOfWork->getOrCreateDocument($this->class->name, $next, $this->unitOfWorkHints);
     }
     return $next;
 }
コード例 #2
0
ファイル: Cursor.php プロジェクト: noikiy/inovi
 /** @override */
 public function getNext()
 {
     $next = parent::getNext();
     if ($next && $this->hydrate) {
         return $this->unitOfWork->getOrCreateDocument($this->class->name, $next, $this->hints);
     }
     return $next ? $next : null;
 }