_db = $db; $this->getSettings(); } /** * Collect settings from Database */ private function getSettings() { $this->_db->query("SELECT * FROM sks_core_settings"); $this->createSettings($this->_db->fetchArray()); } /** * Returns vardump of all Settings in $this->system */ public function sysAll() { return var_dump($this->system); } /** * @param $dbArray */ private function createSettings($dbArray) { foreach ($dbArray as $item) { $this->system[$item['setting']] = $item['value']; } } /** * @param $value * @return string */ public function getValue($value) { if(!$this->system[$value]) { return $value . ' is not Defined'; } return $this->system[$value]; } /** * @return mixed */ public function getVersion() { $cmsversion = explode('|', $this->system['cms_vers']); return $cmsversion[0]; } }