public function __get($name) { if (!$this->eavEnable) { return parent::__get($name); } try { return parent::__get($name); } catch (CException $ex) { if ($this->hasEavAttribute($name)) { return $this->getEavAttribute($name); } else { throw $ex; } } }