public function url(string $routeName, array $parameters = []): ?string
    {
        if (isset($this->names[$routeName]) == false) {
            return null;
        }

        $uri = $this->names[$routeName]->getUri();

        foreach ($parameters as $name => $value) {
            $uri = preg_replace('/\??\{'.$name.'\??\}/', $value, $uri);
        }

        $uri = preg_replace('/{[^\}]+\?\}/', '', $uri);
        $uri = str_replace('/?', '', $uri);

        return $uri;
    }