public static function load(string $dir, int $depth = 6, array $priority = [], array $extensions = ['php'])
    {
        /* Stop when search to maximum depth */
        if ($depth == 0) {
            return;
        }

        /* Load Priority Files */
        foreach ($priority as $file) {
            self::load($file, 1, [], $extensions);
        }

        /* Get all files and folders under current directory */
        $filesAndFolders = glob($dir . DIRECTORY_SEPARATOR . "*");

        /* Go through each item */
        foreach ($filesAndFolders as $path) {
            /* If is directory, search files under its directory */
            if (is_dir($path)) {
                self::load($path, $depth - 1, [], $extensions);
            }

            /* If the file extension is in extensions list; require it */
            elseif (in_array(pathinfo($path, PATHINFO_EXTENSION), $extensions)) {
                require_once $path;
            }
        }
    }