public function __get($name)
{
if (in_array($name, ['layout', 'view', 'theme', 'autoLayout', 'viewPath', 'layoutPath'], true)) {
$method = $name === 'viewPath' ? 'templatePath' : $name;
trigger_error(sprintf('Controller::$%s is deprecated. Use $this->viewBuilder()->%s() instead.', $name, $method), E_USER_DEPRECATED);
return $this->viewBuilder()->{$name}();
}
list($plugin, $class) = pluginSplit($this->modelClass, true);
if ($class !== $name) {
return false;
}
return $this->loadModel($plugin . $class);
}