You are here

public function Collection::exists in Plug 7

Tests for the existence of an element that satisfies the given predicate.

Parameters

Closure $p The predicate.:

Return value

boolean TRUE if the predicate is TRUE for at least one element, FALSE otherwise.

2 methods override Collection::exists()
AbstractLazyCollection::exists in lib/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php
Tests for the existence of an element that satisfies the given predicate.
ArrayCollection::exists in lib/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php
Tests for the existence of an element that satisfies the given predicate.

File

lib/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php, line 196

Class

Collection
The missing (SPL) Collection/Array/OrderedMap interface.

Namespace

Doctrine\Common\Collections

Code

public function exists(Closure $p);