@param string $field
@param mixed  $value

@return $this
7862
public function setOnInsert(string $field, $value)
    {
        $this->update();
        $this->mongoDbUpdate['$setOnInsert'][$field] = $value;

        return $this;
    }
514301
public function set(string $field, $value)
    {
        $this->update();
        $this->mongoDbUpdate['$set'][$field] = $value;

        return $this;
    }
1313097
protected function setData($field, $value)
    {
        if (property_exists($this, $field)) {
            $this->{$field} = $value;
        } else {
            throw new KeyInvalidException("Property \"{$field}\" does not exist on \"". get_class($this) ."\".");
        }

        return $this;
    }
173186
public function addFilterBy(string $field, string $value): self
    {
        $this->filterBy[$field] = $value;

        return $this;
    }
47129
public function in($field, $value) {
        $this->add($field, Expr::IN, (array) $value);

        return $this;
    }
299677
public function setValue($field, $value) {
        if (is_array($this->values)) {
            $this->values[$field] = $value;
        } elseif (is_object($this->values)) {
            $this->values->$field = $value;
        }
    }
1209084
public function setFieldValue($object, $field, $value)
    {
        $this->assertObjectInstance($object);

        return $this->getField($field)->set($object, $value);
    }
81345
public function exp($field, $value)
    {
        $this->data($field, $this->raw($value));
        return $this;
    }
217382
public function whereEndsWith($field, $value)
    {
        foreach ($this->queries as $query) {
            $query->whereEndsWith($field, $value);
        }

        return $this;
    }
1203259
public function assertInputValueIsNot($field, $value)
    {
        PHPUnit::assertNotEquals(
            $value, $this->inputValue($field),
            "Value [{$value}] for the [{$field}] input should not equal the actual value."
        );

        return $this;
    }
172943
public function where($field, $value)
    {
        if (strtolower($field) === "meta_query") {
            return $this->metaWhere($field, $value);
        } elseif (strtolower($field) === "tax_query") {
            return $this->taxWhere($field, $value);
        }

        $this->filters[$field] = $value;
        return $this;
    }
773108
public function oneBy(string $field, $value)
    {
        $model = $this->queryRelate->where($field, $value)->getQuery()->first();

        $this->resetQueryRelate();

        return $model;
    }
520958
public function filterEq(string $field, $value): self
    {
        $this->filters[] = new IndexQueryFilter($field, IndexQueryFilterOperator::EQUAL_TO(), $value);
        return $this;
    }
243096
public function setNewValue($field, $value)
    {
        $this->assertValidField($field);

        $this->entityChangeSet[$field][1] = $value;
    }
510920
public function setHeader($field, $value)
    {
        if (!$field = @trim($field)) {
            throw new HTTPException(
                'Non-empty string field name required at Argument 1'
            );
        }

        $ucField = strtoupper($field);

        if ($ucField === 'SET-COOKIE') {
            $this->setCookieFromRawHeaderValue($value);

            return $this;
        } elseif (is_scalar($value) || is_null($value)) {
            $value = [(string) $value];
        } elseif (!(is_array($value) && $this->isValidArrayHeader($value))) {
            throw new HTTPException(
                'Invalid header; scalar or one-dimensional array of scalars required'
            );
        }

        if (isset($this->ucHeaders[$ucField])) {
            // There's already a case-insensitive match for this field name. Reuse the
            // existing case mapping.
            $field = $this->ucHeaders[$ucField];
        }

        $this->headers[$field] = $value;
        $this->ucHeaders[$ucField] = $field;

        return $this;
    }
1123178
public function setField($field)
    {
        if(is_string($field)) {
            $field = new FieldIdentifier($field);
        }
        $this->field = $field;
        return $this;
    }
180870
public function addPostField($field, $value) {
        if (is_null($this->postData)) {
            $this->postData = array();
        }

        if (is_array($this->postData)) {
            $this->postData[$field] = (string) $value;
            return $this;
        } else {
            throw new LogicException('cannot set field for non array');
        }
    }