<?php


use ModulesGarden\HostingQuotaNotifications\Core\ServiceLocator;



function hosting_quota_notifications_config()
{
    require_once __DIR__ . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'Bootstrap.php';
    return ServiceLocator::call("configurationAddon", 'config');
}

function hosting_quota_notifications_activate()
{
    require_once __DIR__ . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'Bootstrap.php';
    return ServiceLocator::call("configurationAddon", 'activate');
}

function hosting_quota_notifications_deactivate()
{
    require_once __DIR__ . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'Bootstrap.php';
    return ServiceLocator::call("configurationAddon", 'deactivate');
}

function hosting_quota_notifications_upgrade($params)
{
    require_once __DIR__ . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'Bootstrap.php';
    return ServiceLocator::call("configurationAddon")
           ->update(isset($params['version']) ? $params['version'] : '');
}

function hosting_quota_notifications_output($params)
{
    require_once __DIR__ . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'Bootstrap.php';
    
    ServiceLocator::call("controller")->setParams($params)->execute();
    
    /**global $micro_time_mg;
    
    echo microtime(true) - $micro_time_mg;
    exit;*/
}

function hosting_quota_notifications_clientarea($params)
{
    require_once __DIR__ . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'Bootstrap.php';
    
    return ServiceLocator::call("clientController")->setParams($params)->execute();
}