ORM::where_any_is PHP Method

where_any_is() public method

By default, an equal operator will be used against all columns, but it can be overriden for any or every column using the second parameter. Each condition will be ORed together when added to the final query.
public where_any_is ( $values, $operator = '=' )
    public function where_any_is($values, $operator = '=')
    {
        $data = array();
        $query = array("((");
        $first = true;
        foreach ($values as $value) {
            if ($first) {
                $first = false;
            } else {
                $query[] = ") OR (";
            }
            $firstsub = true;
            foreach ($value as $key => $item) {
                $op = is_string($operator) ? $operator : (isset($operator[$key]) ? $operator[$key] : '=');
                if ($firstsub) {
                    $firstsub = false;
                } else {
                    $query[] = "AND";
                }
                $query[] = $this->_quote_identifier($key);
                $data[] = $item;
                $query[] = $op . " ?";
            }
        }
        $query[] = "))";
        return $this->where_raw(join($query, ' '), $data);
    }
ORM