For all route annotations using
FOM\ManagerBundle\Configuration\Route,
this adds the configured prefix.

@inheritdoc
971740
protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot)
    {
        parent::configureRoute($route, $class, $method, $annot);
        if(is_a($annot, 'FOM\ManagerBundle\Configuration\Route')) {
            $route->setPath($this->prefix . $route->getPath());
        }
    }
1317389
public static function add(Route $route)
    {
        exception_if(self::checkDuplicated($route), RouteDuplicatedException::class, $route);

        // Create new route for url ended with '/'
        $routeWithoutSlash = $route;
        $routeWithSlash = $route->getWithSlash();

        self::$register[$routeWithoutSlash->getName()] = $routeWithoutSlash;
        self::$register[$routeWithSlash->getName()] = $routeWithSlash;
    }
391017
public function add($uri, $method = Route::METHOD_ALL, $name = null, $prefix = false)
    {
        if ($prefix) {
            $uri = $this->prefix . $uri . $this->postfix;
        }

        $route = $this->parser->parse($uri, $method);
        if ($name === null || is_int($name)) {
            $name = count($this->routes);
        } elseif (!is_string($name)) {
            throw new \InvalidArgumentException('$name must be a string, integer or null.');
        }
        $this->routes[$name] = $route;
        if ($route->isStatic()) {
            if (!isset($this->staticRoutes[$uri])) {
                $this->staticRoutes[$uri] = [
                    $method => $route
                ];
            } else {
                $this->staticRoutes[$uri][$method] = $route;
            }
        }
        $route->set($this->globalValues);

        return $route;
    }
833858
public function setPathPrefix($prefix)
    {
        parent::setPathPrefix($prefix);
        if (null === $this->pathPrefix) {
            $this->pathPrefix = $this->pathSeparator;
        }
    }
238929
public function prefix($prefix, $callback)
    {
        $partial = new self($this->get($prefix));

        // We will pass the newly created "partial" Configuration object to the
        // callback so that it can be used within the given prefix.
        $callback($partial);

        // We want to make sure that any changes made to the prefixed object are
        // reflected in this object, so we will swap it with the partial.
        $this->set($prefix, $partial->all());

        unset($partial);
    }
951975
def _add_routes(self, settings):
        
        for route_settings in settings:
            if 'prefix' in route_settings:
                prefix_add = self.speaker.prefix_add
            elif 'route_type' in route_settings:
                prefix_add = self.speaker.evpn_prefix_add
            elif 'flowspec_family' in route_settings:
                prefix_add = self.speaker.flowspec_prefix_add
            else:
                LOG.debug('Skip invalid route settings: %s', route_settings)
                continue

            LOG.debug('Adding route settings: %s', route_settings)
            try:
                prefix_add(**route_settings)
            except RuntimeConfigError as e:
                LOG.exception(e)
1242159
public function add( Route $route ){
		$routeId	= $route->getId();
		if( array_key_exists( $routeId, $this->routes ) ){
			throw new \DomainException( sprintf(
				'A route for pattern and method is already registered: %2$s %1$s',
				$route->getPattern(),
				$route->getMethod()
			) );
		}
		$this->routes[$routeId]	= $route;
		return $routeId;
	}
241285
public function setPrefix(string $prefix): FieldTypeInterface
    {
        $this->prefix = $prefix;

        // Update all attached fields with the given prefix.
        foreach ($this->repository->all() as $field) {
            /** @var FieldTypeInterface $field */
            $field->setPrefix($prefix);
        }

        return $this;
    }
1016944
public function add(Route $route)
    {
        $this->routes[] = $route;

        $this->addLookups($route);

        return $route;
    }
1047867
final public function prefix($prefix)
    {
        if (\is_array($prefix)) {
            if (null === $this->parentPrefixes) {
                // no-op
            } elseif ($missing = array_diff_key($this->parentPrefixes, $prefix)) {
                throw new \LogicException(sprintf('Collection "%s" is missing prefixes for locale(s) "%s".', $this->name, implode('", "', array_keys($missing))));
            } else {
                foreach ($prefix as $locale => $localePrefix) {
                    if (!isset($this->parentPrefixes[$locale])) {
                        throw new \LogicException(sprintf('Collection "%s" with locale "%s" is missing a corresponding prefix in its parent collection.', $this->name, $locale));
                    }

                    $prefix[$locale] = $this->parentPrefixes[$locale].$localePrefix;
                }
            }
            $this->prefixes = $prefix;
            $this->route->setPath('/');
        } else {
            $this->prefixes = null;
            $this->route->setPath($prefix);
        }

        return $this;
    }
306278
public function add(Route $route)
    {
        foreach ($route->getMethods() as $method) {
            $this->routes[$method][$route->getPath()] = $route;

            $this->allRoutes[$route->getPath()] = $route;
        }

        return $route;
    }
229947
public function add(Route $route)
    {
        // $this->routes[$route->method()][$route->uri()] = $route;
        $this->routes[$route->method().$route->route()] = $route;
        return $route;
    }
645596
public function prefix($prefix) {
		// Reset values before matching.
		$this->prefix = $this->parentPrefix;
		$this->requestPathOffset = $this->parentRequestPathOffset;
		if ($this->parentPrefixMatched) {
			$this->prefixMatched = $this->parentPrefixMatched;
		}

		if (!$this->result->hasHandler() && $this->prefixMatched) {
			$this->prefixMatched = $this->matchPartial($prefix);
		}

		$this->prefix .= $prefix;

		return $this;
	}
200067
private function addRoutes(array $routes)
    {
        foreach ($routes as $name => $route) {
            if (isset($route['resources'])) {
                $this->loadImports(is_array($route['resources']) ? $route['resources'] :
                (is_string($route['resources']) ? [$route['resources']] : []));
                continue;
            }

            if ((bool)$gkeys = $this->getGroupKeys($route)) {
                $req = isset($route['requirements']) ? $route['requirements'] : [];

                if (null === $prefix = isset($route['pattern']) ? $route['pattern'] : $name) {
                    continue;
                }

                foreach ($gkeys as $i) {
                    $this->loadGroup($prefix, $req, $route[$i]);
                }
                continue;
            }

            $this->addRoute($name, $route);
        }
    }
489227
public function add($method, $pattern): RouteInterface
    {
        $route = new Route($this, $method);
        $route->setContainer($this->container);
        if (null !== $this->actionClass) {
            $route->setActionClass($this->actionClass);
        }
        if (null !== $this->requestClass) {
            $route->setRequestClass($this->requestClass);
        }
        $route->setPackage($this->getPackage());
        $prefixes = [$this->resourceName];
        if ($this->isSubResourceOfPackage()) {
            # Add package before resource
            array_unshift($prefixes, $this->packageName);
        }
        if ($this->routesPrefix) {
            # Add prefix before resource
            array_unshift($prefixes, $this->routesPrefix);
        }
        $pattern = $this->trailingSlash($pattern);
        $pattern = implode('/', $prefixes) . $pattern;
        $pattern = '/' . ltrim($pattern, '/');
        $route->setPattern($pattern);

        $this->data[] = $route;

        return $route;
    }
1119061
public function addPrefix($prefix, array $defaults = [], array $requirements = [])
    {
        $prefix = trim(trim($prefix), '/');

        if ('' === $prefix) {
            return;
        }

        foreach ($this->routes as $route) {
            $route->setPath('/'.$prefix.$route->getPath());
            $route->addDefaults($defaults);
            $route->addRequirements($requirements);
        }
    }
481275
protected function registerRouteScanner()
    {
        $this->app->singleton('annotations.route.scanner', function ($app) {
            $scanner = new RouteScanner([]);

            $scanner->addAnnotationNamespace(
              'Collective\Annotations\Routing\Annotations\Annotations',
              __DIR__.'/Routing/Annotations/Annotations'
            );

            return $scanner;
        });
    }