<?php

namespace ModulesGarden\HostingQuotaNotifications\App\UI\Services\Providers;

use ModulesGarden\HostingQuotaNotifications\App\Helper\Models\Hosting;
use ModulesGarden\HostingQuotaNotifications\App\Libs\Usage\Manage;
use ModulesGarden\HostingQuotaNotifications\Core\UI\Interfaces\AdminArea;
use ModulesGarden\HostingQuotaNotifications\Core\UI\Traits\RequestObjectHandler;
use ModulesGarden\HostingQuotaNotifications\Core\UI\Widget\Forms\DataProviders\BaseModelDataProvider;

/**
 * Class ServicesProvider
 *
 * @author Artur Pilch <artur.pi@modulesgarden.com>
 */
class ServicesProvider extends BaseModelDataProvider implements AdminArea
{
    use RequestObjectHandler;

    public function __construct()
    {
        parent::__construct(null);
    }


    public function getServices()
    {
        $services = Manage::getServicesUsage();
        return  $services ? $services->toArray() : [];
    }

}