public function AbstractLazyCollection::contains in Plug 7
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
- lib/
doctrine/ collections/ lib/ Doctrine/ Common/ Collections/ AbstractLazyCollection.php, line 74
Class
- AbstractLazyCollection
- Lazy collection that is backed by a concrete collection
Namespace
Doctrine\Common\CollectionsCode
public function contains($element) {
$this
->initialize();
return $this->collection
->contains($element);
}