You are here

public function AbstractLazyCollection::contains 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::contains()

Checks whether an element is contained in the collection. This is an O(n) operation, where n is the size of the collection.

Parameters

mixed $element The element to search for.:

Return value

boolean TRUE if the collection contains the element, FALSE otherwise.

Overrides Collection::contains

File

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

Class

AbstractLazyCollection
Lazy collection that is backed by a concrete collection

Namespace

Doctrine\Common\Collections

Code

public function contains($element) {
  $this
    ->initialize();
  return $this->collection
    ->contains($element);
}