<?php

namespace Hura8\System;

use Hura8\Traits\ClassCacheTrait;

class Permission
{

    use ClassCacheTrait;

    public static function getClientEntities() : array {
        return static::getCache("getClientEntities", function (){
            $config_file = CONFIG_DIR . "/client/config_entities.php";
            if(file_exists($config_file)) {
                return include $config_file;
            }

            return [];
        });
    }


    public static function getClientConfigPerModule() {

        return static::getCache("getClientConfigPerModule", function (){
            $config_file = CONFIG_DIR . "/client/admin/config_per_module_disabled.php";
            if(file_exists($config_file)) {
                return include $config_file;
            }

            return [];
        });


    }


}
