Skip to content

Commit

Permalink
added Shanty_Mongo_Iterator_Cursor::getNext()
Browse files Browse the repository at this point in the history
  • Loading branch information
coen-hyde committed Jun 3, 2010
1 parent 33e03d0 commit 8bac232
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion library/Shanty/Mongo/Iterator/Cursor.php
Expand Up @@ -105,6 +105,12 @@ public function current()
return new $documentClass($data, $config);
}

public function getNext()
{
$this->next();
return $this->current();
}

public function key()
{
return $this->getInnerIterator()->key();
Expand All @@ -129,4 +135,4 @@ public function __call($method, $arguments)
{
return $this->getInnerIterator()->$method($arguments);
}
}
}

0 comments on commit 8bac232

Please sign in to comment.