/**
* 获取参数值
* @param $name
* @return bool|mixed|string
*/
public function __get($name)
{
global $zbp;
if ($name == 'SourceType') {
if ($this->Source == 'system') {
return 'system';
} elseif ($this->Source == 'user') {
return 'user';
} elseif ($this->Source == 'theme') {
return 'theme';
} elseif ($this->Source == 'plugin_' . $zbp->theme) {
return 'theme';
} else {
return 'plugin';
}
}
if ($name == 'NoRefresh') {
return (bool) $this->Metas->norefresh;
}
if ($name == 'Name' && $this->Source == 'system') {
switch ($this->FileName) {
case 'calendar':
return $zbp->lang['msg']['calendar'];
case 'controlpanel':
return $zbp->lang['msg']['control_panel'];
case 'searchpanel':
return $zbp->lang['msg']['search'];
default:
return $zbp->lang['msg']['module_' . $this->FileName];
}
}
return parent::__get($name);
}