_myProperty = $value; } else { parent::__set($name, $value); } } public function getMyProperty() { return $this->_myProperty; } }In this example, the __set() method is overridden to store the value of the 'myProperty' attribute in a private variable called $_myProperty. The getMyProperty() method is also defined to retrieve the value of this attribute. The yii\base package library provides the Model class and the __set() method.