You are here

public function AbstractLazyCollection::forAll in Plug 7

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

lib/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);
}