YaLinqo\Enumerable::contains PHP Method

contains() public method

Syntax: contains (value)

Determines whether a sequence contains a specified element. Enumeration is terminated as soon as a matching element is found.

public contains ( $value ) : boolean
$value mixed The value to locate in the sequence.
return boolean true if the source sequence contains an element that has the specified value; otherwise, false.
    public function contains($value)
    {
        foreach ($this as $v) {
            if ($v === $value) {
                return true;
            }
        }
        return false;
    }