find elements except elements which has field founded in keys

@param String $field
@param array $keys
@return Collection
436138
public function except_by_key($field, $keys)
    {
        return $this->filter(function($fieldset) use($field, $keys) {
                    if (isset($fieldset->{$field}) and in_array($fieldset->{$field}, $keys)) {
                        return false;
                    }
                });
    }
1110006
private function getSelectQuery($table, $fields, $fieldName, $keys)
    {
        /** @var Select $query */
        $query = $this->applyFilters(
            $this->queryBuilder
                ->select($fields)
                ->from($table, $this->alias)
        );

        $query->where(
            $this->equalsExpression($fieldName, $keys)
        );

        return $query;
    }
525960
public function addFields($fields)
    {
        foreach ($fields as $field) {
            if (is_array($field)) {
                $this->addField(...$field);
            } else {
                $this->addField($field);
            }
        }

        return $this;
    }
716249
public function except($excepts)
    {
        $excepts = is_array($excepts) ? $excepts : func_get_args();

        $this->fields = array_filter($this->fields,function($field) use($excepts){
            return !in_array($field,$excepts);
        });

        return $this;
    }
484049
public function fields($fields)
    {
        if (is_array($fields) || $fields === null) {
            $this->fields = $fields;
        } else {
            $this->fields = func_get_args();
        }
        return $this;
    }
88302
public function hmSet($key, $fields)
    {
        $this->log(__FUNCTION__, $key);
        return $this->persistence->hmSet($key, $fields);
    }
113602
public function fields($fields) {
        if (!is_array($fields)) {
            $fields = func_get_args();
        }

        $this->_fields = $fields;

        return $this;
    }
157698
public static function filterKeys ($array, $keys)
		{
			if (is_array($array))
			{
				$return = [];
				if (!is_array($keys))
					$keys = [ $keys ];
				foreach ($keys as $key)
					if (isset($array[ $key ]))
						$return[ $key ] = $array[ $key ];

				return $return;
			}

			return null;
		}
106289
protected static function hash($fields)
    {
        foreach ($fields as $key => $value) {
            if (in_array($key, self::$fields)) {
                $fields[$key] = Hash::make($value);
            }
        }

        return $fields;
    }
504891
public function unsetField($fields)
    {
        $fields = (array)$fields;
        foreach ($fields as $field) {
            unset($this->data[$field]);
        }

        return $this;
    }
121236
public function exclude($keys)
    {
        if (! is_array($keys)) {
            $keys = func_get_args();
        }

        $this->exclude = array_filter($keys);

        return $this;
    }
170742
public function filter($keys, $exclude = false): SplArray
    {
        if (is_string($keys)) {
            $keys = explode(',', $keys);
        }
        $new = array();
        foreach ($this->getArrayCopy() as $name => $value) {
            if (!$exclude) {
                in_array($name, $keys) ? $new[$name] = $value : null;
            } else {
                in_array($name, $keys) ? null : $new[$name] = $value;
            }
        }
        return new SplArray($new);
    }
408383
public function except($keys)
    {
        $keys = is_array($keys) ? $keys : func_get_args();

        $results = $this->all();

        Arr::forget($results, $keys);

        return $results;
    }
224866
public function deleteByField($fieldName, $keys)
    {
        $keys = (array)$keys;
        if (empty($keys)) {
            return;
        }
        //Filter relations so we don't delete records which this one only belongs to
        $relations = array_filter(
            $this->entity->getRelations(),
            function (Relation $relation) {
                return !$relation instanceof Relation\BelongsTo;
            }
        );
        if (empty($relations)) {
            $this->manager->postPendingQuery(
                new PendingQuery(
                    $this->entity,
                    PendingQuery::TYPE_DELETE,
                    $this->queryBuilder
                        ->delete($this->entity->getTable())
                        ->where($this->equalsExpression($fieldName, $keys)),
                    $this->parameters
                )
            );
        } else {
            $this->deleteRecords(
                $this->with(array_keys($relations))
                     ->getByField($fieldName, $keys)
            );
        }
    }
957945
public function only($keys)
    {
        // Convert $keys to array if necessary
        if (!is_array($keys)) {
            $keys = preg_split("/, */", $keys, -1, PREG_SPLIT_NO_EMPTY);
        }

        foreach ($keys as $id => $key) {
            $keys[$id] = $this->normalizeKey($key);
        }

        // Compare filter items by provided keys and return new array
        return array_intersect_key($this->data, array_flip($keys));
    }
632204
public function hasMany(array $keys)
    {
        $values = $this->getMany($keys);

        return array_map(function ($value) {
            return ! is_null($value);
        }, $values);
    }
145060
public function filterByPrimaryKeys($keys)
    {
        if (empty($keys)) {
            return $this->add(null, '1<>1', Criteria::CUSTOM);
        }
        foreach ($keys as $key) {
            $cton0 = $this->getNewCriterion(StructureNodeParentTableMap::COL_STRUCTURE_NODE_ID, $key[0], Criteria::EQUAL);
            $cton1 = $this->getNewCriterion(StructureNodeParentTableMap::COL_PARENT_ID, $key[1], Criteria::EQUAL);
            $cton0->addAnd($cton1);
            $this->addOr($cton0);
        }

        return $this;
    }