League\Monga\Query\Update::set PHP Метод

set() публичный Метод

Update the field from a document.
public set ( string $field, string $value = null ) : object
$field string field name
$value string new value
Результат object $this
    public function set($field, $value = null)
    {
        if (!is_array($field)) {
            $field = [$field => $value];
        }
        foreach ($field as $f => $v) {
            $this->update('$set', $f, $v);
        }
        return $this;
    }