static function register(string $id, string $dir, $options = []): bool
    {
        if (isset(self::$data[$id])) {
            return false;
        }
        if (!isset($id{0})) {
            throw new \InvalidArgumentException('The value of the id argument cannot be empty.');
        }
        $dir = rtrim(\BearFramework\Internal\Utilities::normalizePath($dir), '/');
        if (!is_dir($dir)) {
            throw new \InvalidArgumentException('The value of the dir argument is not a valid directory.');
        }
        self::$data[$id] = new \BearFramework\Addon($id, $dir, $options);
        return true;
    }