public function connectDb(array $settings)
    {
        try {
            $this->db = new Database;
            $this->db->init($settings);
        } catch (Exception $ex) {
            $this->db = null;
            return $this->translation->text($ex->getMessage());
        }

        return $this->validateDb();
    }
public function connectDb(array $settings)
    {
        try {
            $this->db = new Database;
            $this->db->init($settings);
        } catch (Exception $ex) {
            $this->db = null;
            return $this->translation->text($ex->getMessage());
        }

        return $this->validateDb();
    }
public function connectDb ( array $ settings ) { try { $ this -> db = new Database ; $ this -> db -> init ( $ settings ) ; } catch ( Exception $ ex ) { $ this -> db = null ; return $ this -> translation -> text ( $ ex -> getMessage ( ) ) ; } return $ this -> validateDb ( ) ; }
Tries to connect to the database
@param array $settings
@return boolean|string
Tries to connect to the database