protected function _setConfig(array $config)
{
if ($config['alias']) {
$this->alias = $config['alias'];
} else {
$this->alias = $config['name'];
}
$this->enabled = $config['status'];
$this->id = $config['id'];
$this->device = $config['device'];
$this->lang = $config['lang'];
$this->sameMainUrl = $config['same_main_url'];
$this->autoRedirect = $config['auto_redirect'];
$this->autoLink = $config['auto_link'];
$this->mainSiteId = $config['main_site_id'];
$this->theme = $config['theme'];
$this->useSubDomain = $config['use_subdomain'];
if ($this->useSubDomain) {
if (!empty($config['domain_type'])) {
$this->domainType = $config['domain_type'];
} else {
$this->domainType = 1;
}
} else {
$this->domainType = 0;
}
}