public function getNamedRoute($name)
    {
        if (is_null($this->namedRoutes)) {
            $this->buildNameIndex();
        }
        if (!isset($this->namedRoutes[$name])) {
            throw new RuntimeException('Named route does not exist for name: '.$name);
        }

        return $this->namedRoutes[$name];
    }