<?php
/**
 * @package     DOCman
 * @copyright   Copyright (C) 2019 Timble CVBA. (http://www.timble.net)
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.joomlatools.com
 */

function docman_uninstall()
{
    try { 
        \Foliokit::getObject('database.driver.mysqli')->execute(\Foliolabs\Docman\InstallHelper::getFilesystem()->get_contents(__DIR__.'/uninstall.sql'), \Foliolabs\Library\Database::MULTI_QUERY);
    } catch (\Exception $e) {
        if (defined('WP_DEBUG') && WP_DEBUG) {
            throw $e;
        }
    }

    delete_option('docman_installed');
}