1576313503a7b92a74aa105e6123483861dd1e48
[yaffs-website] / vendor / symfony-cmf / routing / ChainRouterInterface.php
1 <?php
2
3 /*
4  * This file is part of the Symfony CMF package.
5  *
6  * (c) 2011-2015 Symfony CMF
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Cmf\Component\Routing;
13
14 use Symfony\Component\Routing\RouterInterface;
15 use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
16
17 /**
18  * Interface for a router that proxies routing to other routers.
19  *
20  * @author Daniel Wehner <dawehner@googlemail.com>
21  */
22 interface ChainRouterInterface extends RouterInterface, RequestMatcherInterface
23 {
24     /**
25      * Add a Router to the index.
26      *
27      * @param RouterInterface $router   The router instance. Instead of RouterInterface, may also
28      *                                  be RequestMatcherInterface and UrlGeneratorInterface.
29      * @param int             $priority The priority
30      */
31     public function add($router, $priority = 0);
32
33     /**
34      * Sorts the routers and flattens them.
35      *
36      * @return RouterInterface[] or RequestMatcherInterface and UrlGeneratorInterface.
37      */
38     public function all();
39 }