@@ 100-112 (lines=13) @@ | ||
97 | /** |
|
98 | * {@inheritdoc} |
|
99 | */ |
|
100 | public function findVisibleByNames(array $names) |
|
101 | { |
|
102 | $routes = array(); |
|
103 | $diffNames = array_diff($names, array_keys($this->routes)); |
|
104 | ||
105 | foreach ($this->routes as $name => $route) { |
|
106 | if (in_array($name, $names) && $route->isVisible()) { |
|
107 | $routes[] = $route; |
|
108 | } |
|
109 | } |
|
110 | ||
111 | return array_merge($routes, $this->routeManager->findVisibleByNames($diffNames)); |
|
112 | } |
|
113 | ||
114 | /** |
|
115 | * {@inheritdoc} |
|
@@ 131-145 (lines=15) @@ | ||
128 | /** |
|
129 | * {@inheritdoc} |
|
130 | */ |
|
131 | public function findByRoutePatterns(array $routePatterns) |
|
132 | { |
|
133 | $result = array(); |
|
134 | foreach ($routePatterns as $routePattern) { |
|
135 | foreach ($this->routes as $route) { |
|
136 | if ($routePattern === $route->getRoutePattern()) { |
|
137 | $result[$routePattern] = $route; |
|
138 | } |
|
139 | } |
|
140 | } |
|
141 | ||
142 | $diffRoutePatterns = array_diff($routePatterns, array_keys($result)); |
|
143 | ||
144 | return array_merge(array_values($result), $this->routeManager->findByRoutePatterns($diffRoutePatterns)); |
|
145 | } |
|
146 | ||
147 | /** |
|
148 | * {@inheritdoc} |
|
@@ 150-164 (lines=15) @@ | ||
147 | /** |
|
148 | * {@inheritdoc} |
|
149 | */ |
|
150 | public function findVisibleByRoutePatterns(array $routePatterns) |
|
151 | { |
|
152 | $result = array(); |
|
153 | foreach ($routePatterns as $routePattern) { |
|
154 | foreach ($this->routes as $route) { |
|
155 | if (($routePattern === $route->getRoutePattern()) && $route->isVisible()) { |
|
156 | $result[$routePattern] = $route; |
|
157 | } |
|
158 | } |
|
159 | } |
|
160 | ||
161 | $diffRoutePatterns = array_diff($routePatterns, array_keys($result)); |
|
162 | ||
163 | return array_merge(array_values($result), $this->routeManager->findVisibleByRoutePatterns($diffRoutePatterns)); |
|
164 | } |
|
165 | ||
166 | /** |
|
167 | * {@inheritdoc} |