public function __set($name, $value) { if (in_array($name, $this->attributes())) { $this->_prepodavatel_peresechenie = null; } parent::__set($name, $value); }