Add a Drupal-overriding UrlMatcher Final Matcher.

8.0.x
Larry Garfield 2012-12-18 22:57:56 -06:00
parent 960f926ebe
commit 83c95d7c62
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
<?php
namespace Drupal\Core\Routing;
use Symfony\Cmf\Component\Routing\NestedMatcher\UrlMatcher as BaseUrlMatcher;
/**
* Description of UrlMatcher
*
* @author crell
*/
class UrlMatcher extends BaseUrlMatcher {
public function finalMatch(RouteCollection $collection, Request $request) {
$this->routes = $collection;
$context = new RequestContext();
$context->fromRequest($request);
$this->setContext($context);
return $this->match($request->attributes->get('system_path'));
}
}