/** * @inheritdoc */ public function __set($name, $value) { if (in_array($name, $this->attributes()) || !array_key_exists('set' . ucfirst($name), $this->_methods)) { parent::__set($name, $value); } else { return Yii::$container->invoke($this->_methods['set' . ucfirst($name)], [$this, $value]); } }