$cursor
$cursor : \RedBeanPHP\Cursor
BeanCollection.
The BeanCollection represents a collection of beans and makes it possible to use database cursors. The BeanCollection has a method next() to obtain the first, next and last bean in the collection. The BeanCollection does not implement the array interface nor does it try to act like an array because it cannot go backward or rewind itself.
Use the BeanCollection for large datasets where skip/limit is not an option. Keep in mind that ID-marking (querying a start ID) is a decent alternative though.
$cursor : \RedBeanPHP\Cursor
$repository : \RedBeanPHP\Repository
__construct(string $type, \RedBeanPHP\Repository $repository, \RedBeanPHP\Cursor $cursor, string $mask = '__meta') : void
Constructor, creates a new instance of the BeanCollection.
string | $type | type of beans in this collection |
\RedBeanPHP\Repository | $repository | repository to use to generate bean objects |
\RedBeanPHP\Cursor | $cursor | cursor object to use |
string | $mask | meta mask to apply (optional) |
next() : \RedBeanPHP\OODBBean|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.