private function resolveName($name)
    {
        if ($name !== null) {
            return $name;
        }

        if (!isset($this->defaults['route'])) {
            throw new RouterException('Unable to make "self" url - default route was not defined.');
        }

        return $this->defaults['route'];
    }