Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add info about Collection sugar methods #348

Open
marcj opened this issue Jan 28, 2015 · 0 comments
Open

Add info about Collection sugar methods #348

marcj opened this issue Jan 28, 2015 · 0 comments

Comments

@marcj
Copy link
Member

marcj commented Jan 28, 2015

Since PHP has a memory leak in our Collection classes we've removed the possibility to call our sugar methods (isLast, isOdd, etc) on a collection directly. It's necessary now to call those methods on the iterator instead.

$books = BookQuery::create()->find();
$iterator = $books->getIterator();
foreach ($iterator as $book){
    if ($iterator->isLast()) {
        //...
    }
}

We have anyhow very less information about that feature documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant