/** * Class constructor. * * @param array userinfo * @param array settings */ protected function __construct($userinfo, $db, $settings) { $this->userinfo = $userinfo; $this->db = $db; $this->settings = $settings; self::$logtypes = array(); if (!isset($this->settings['logger']['logtypes']) && (!isset($this->settings['logger']['logtypes']) || $this->settings['logger']['logtypes'] == '') && isset($this->settings['logger']['enabled']) && $this->settings['logger']['enabled']) { self::$logtypes[0] = 'syslog'; self::$logtypes[1] = 'mysql'; } else { if (isset($this->settings['logger']['logtypes']) && $this->settings['logger']['logtypes'] != '') { self::$logtypes = explode(',', $this->settings['logger']['logtypes']); } else { self::$logtypes = null; } } }