Mongolid\Model\Attributes::fill PHP Метод

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

Set the model attributes using an array.
public fill ( array $input, boolean $force = false ) : void
$input array The data that will be used to fill the attributes.
$force boolean Force fill.
Результат void
    public function fill(array $input, bool $force = false)
    {
        foreach ($input as $key => $value) {
            if ($force) {
                $this->setAttribute($key, $value);
                continue;
            }
            if ((empty($this->fillable) || in_array($key, $this->fillable)) && !in_array($key, $this->guarded)) {
                $this->setAttribute($key, $value);
            }
        }
    }