1 | <?php |
||
22 | class MockRouteManager extends BaseRouteManager |
||
23 | { |
||
24 | /** |
||
25 | * @var array|RouteInterface[] |
||
26 | */ |
||
27 | private $routes = array(); |
||
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | public function findByName($name) |
||
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | public function findByNames(array $names) |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | public function findByRoutePattern($routePattern) |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function findByRoutePatterns(array $routePatterns) |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function all() |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | public function add(RouteInterface $route, $save = false) |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | public function remove(RouteInterface $route, $save = false) |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function save() |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | public function clear() |
||
106 | |||
107 | /** |
||
108 | * {@inheritdoc} |
||
109 | */ |
||
110 | public function getClass() |
||
114 | |||
115 | /** |
||
116 | * Find all route name and pattern. |
||
117 | * |
||
118 | * @return array |
||
119 | */ |
||
120 | public function findAllNameAndPattern() |
||
124 | |||
125 | /** |
||
126 | * Find visible route by name. |
||
127 | * |
||
128 | * @param string $name |
||
129 | * |
||
130 | * @return null|RouteInterface |
||
131 | */ |
||
132 | public function findVisibleByName($name) |
||
136 | |||
137 | /** |
||
138 | * Find visible routes by many names. |
||
139 | * |
||
140 | * @param array $names |
||
141 | * |
||
142 | * @return array|RouteInterface[] |
||
143 | */ |
||
144 | public function findVisibleByNames(array $names) |
||
148 | |||
149 | /** |
||
150 | * Find visible routes by many route patterns. |
||
151 | * |
||
152 | * @param array $routePatterns |
||
153 | * |
||
154 | * @return array|RouteInterface[] |
||
155 | */ |
||
156 | public function findVisibleByRoutePatterns(array $routePatterns) |
||
160 | } |
||
161 |