Mongolid\Model\Attributes::__set PHP Method

__set() public method

Dynamically set attributes on the model.
public __set ( mixed $key, mixed $value ) : void
$key mixed Attribute name.
$value mixed Value to be set.
return void
    public function __set($key, $value)
    {
        if ($this->mutable && $this->hasMutatorMethod($key, 'set')) {
            $value = $this->{$this->buildMutatorMethod($key, 'set')}($value);
        }
        $this->setAttribute($key, $value);
    }