function AbstractCollection::contains
Overrides CollectionInterface::contains
2 calls to AbstractCollection::contains()
- AbstractSet::add in vendor/
ramsey/ collection/ src/ AbstractSet.php - Ensures that this collection contains the specified element (optional operation).
- AbstractSet::offsetSet in vendor/
ramsey/ collection/ src/ AbstractSet.php - Sets the given value to the given offset in the array.
File
-
vendor/
ramsey/ collection/ src/ AbstractCollection.php, line 67
Class
- AbstractCollection
- This class provides a basic implementation of `CollectionInterface`, to minimize the effort required to implement this interface
Namespace
Ramsey\CollectionCode
public function contains(mixed $element, bool $strict = true) : bool {
return in_array($element, $this->data, $strict);
}