_aSystems = $this->getSystems(); if(!isset($this->_aSystems[$sSystem])) return; $this->_sSystem = $sSystem; $this->_aSystem = $this->_aSystems[$sSystem]; if(!$this->isEnabled()) return; if($iInit) $this->init($iId); } public function init($iId) { if(!$this->isEnabled()) return false; if(empty($this->_iId) && $iId) $this->setId($iId); return true; } public function getSystemId() { return $this->_aSystem['id']; } public function getSystemName() { return $this->_sSystem; } public function getSystemInfo() { return $this->_aSystem; } public function getId() { return $this->_iId; } public function setId($iId) { if($iId == $this->getId()) return; $this->_iId = $iId; } public function isEnabled () { return $this->_aSystem && (int)$this->_aSystem['is_on'] == 1; } } /** @} */