4 * This file is part of the Symfony CMF package.
6 * (c) 2011-2015 Symfony CMF
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Cmf\Component\Routing;
14 use Symfony\Component\Routing\RouterInterface;
15 use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
18 * Interface for a router that proxies routing to other routers.
20 * @author Daniel Wehner <dawehner@googlemail.com>
22 interface ChainRouterInterface extends RouterInterface, RequestMatcherInterface
25 * Add a Router to the index.
27 * @param RouterInterface $router The router instance. Instead of RouterInterface, may also
28 * be RequestMatcherInterface and UrlGeneratorInterface.
29 * @param int $priority The priority
31 public function add($router, $priority = 0);
34 * Sorts the routers and flattens them.
36 * @return RouterInterface[] or RequestMatcherInterface and UrlGeneratorInterface.
38 public function all();