/** * PHP getter magic method. * This method is overridden so that attributes and related objects can be accessed like properties. * * @param string $name property name * * @throws \yii\base\InvalidParamException if relation name is wrong * @return mixed property value * @see getAttribute() */ public function __get($name) { if (!empty($this->_dynamicField[$name])) { if (!empty($this->_dynamicData[$name])) { return $this->_dynamicData[$name]; } else { return null; } } else { return parent::__get($name); } }