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