You are here

public function AbstractLazyCollection::forAll in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php \Doctrine\Common\Collections\AbstractLazyCollection::forAll()

Tests whether the given predicate p holds for all elements of this collection.

Parameters

Closure $p The predicate.:

Return value

boolean TRUE, if the predicate yields TRUE for all elements, FALSE otherwise.

Overrides Collection::forAll

File

vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php, line 227

Class

AbstractLazyCollection
Lazy collection that is backed by a concrete collection

Namespace

Doctrine\Common\Collections

Code

public function forAll(Closure $p) {
  $this
    ->initialize();
  return $this->collection
    ->forAll($p);
}