public function load(string $item) : array
    {
        if (empty($this->dirs)) {
            throw new Exception("The array for configuration directories can not be empty.");
        }

        $found = false;
        $config = [];
        $mapping = $this->mapping[$item] ?? null;
        if ($mapping) {
            $config["file"] = $mapping;
            $config["config"] = require $mapping;
            return $config;
        }

        foreach ($this->dirs as $dir) {
            $path = "$dir/$item";
            $file = "$path.php";

            // The configuration is found in ONLY a file
            if (is_readable($path) && is_file($path)) {
                $found = true;
                $config["file"] = $path;
                $config["config"] = require $path;
                break;
            }

            // The configuration is found in a file
            if (is_readable($file) && is_file($file)) {
                $found = true;
                $config["file"] = $file;
                $config["config"] = require $file;
            }

            // The configuration is found in a directory
            if (is_readable($path) && is_dir($path)) {
                $found = true;
                $config["items"] = $this->loadFromDir($path);
            }

            if ($found) {
                break;
            }
        }

        if (!$found) {
            throw new Exception("Configure item '$item' can not be found.");
        }

        return $config;
    }