public static function config($key, $value = null)
    {
        if (is_string($key)) {
            static::$config[$key] = $value;

            return;
        }

        if (!is_array($key)) {
            throw new InvalidArgumentException('Only string and array can be passed to config.');
        }

        foreach ($key as $name => $value) {
            static::$config[$name] = $value;
        }

        return;
    }