public function initialise($options)
    {
        // Get the application.
        /* @var InstallationApplicationWeb $app */
        $app = JFactory::getApplication();

        // Get the options as a object for easier handling.
        $options = JArrayHelper::toObject($options);

        // Load the back-end language files so that the DB error messages work.
        $lang = JFactory::getLanguage();
        $currentLang = $lang->getTag();

        // Load the selected language
        if (JLanguage::exists($currentLang, JPATH_ADMINISTRATOR))
        {
            $lang->load('joomla', JPATH_ADMINISTRATOR, $currentLang, true);
        }
        // Pre-load en-GB in case the chosen language files do not exist.
        else
        {
            $lang->load('joomla', JPATH_ADMINISTRATOR, 'en-GB', true);
        }

        // Ensure a database type was selected.
        if (empty($options->db_type))
        {
            $app->enqueueMessage(JText::_('INSTL_DATABASE_INVALID_TYPE'), 'notice');

            return false;
        }

        // Get a database object.
        try
        {
            return InstallationHelperDatabase::getDbo(
                $options->db_type, $options->db_host, $options->db_user, $options->db_pass, $options->db_name, $options->db_prefix, $options->db_select
            );
        }
        catch (RuntimeException $e)
        {
            $app->enqueueMessage(JText::sprintf('INSTL_DATABASE_COULD_NOT_CONNECT', $e->getMessage()), 'notice');

            return false;
        }
    }