diff --git a/core/lib/Drupal/Core/Routing/UrlMatcherDumper.php b/core/lib/Drupal/Core/Routing/MatcherDumper.php similarity index 98% rename from core/lib/Drupal/Core/Routing/UrlMatcherDumper.php rename to core/lib/Drupal/Core/Routing/MatcherDumper.php index f7969aa8bf4..6c425af2800 100644 --- a/core/lib/Drupal/Core/Routing/UrlMatcherDumper.php +++ b/core/lib/Drupal/Core/Routing/MatcherDumper.php @@ -9,9 +9,9 @@ use Symfony\Component\Routing\RouteCollection; use Drupal\Core\Database\Connection; /** - * Description of UrlMatcherDumper. + * Dumps Route information to a database table. */ -class UrlMatcherDumper implements MatcherDumperInterface { +class MatcherDumper implements MatcherDumperInterface { /** * The maximum number of path elements for a route pattern; diff --git a/core/lib/Drupal/Core/Routing/UrlMatcher.php b/core/lib/Drupal/Core/Routing/UrlMatcher.php deleted file mode 100644 index d84a45bfc93..00000000000 --- a/core/lib/Drupal/Core/Routing/UrlMatcher.php +++ /dev/null @@ -1,100 +0,0 @@ -context = new RequestContext(); - } - - /** - * Sets the request context. - * - * This method is just to satisfy the interface, and is largely vestigial. - * The request context object does not contain the information we need, so - * we will use the original request object. - * - * @param Symfony\Component\Routing\RequestContext $context - * The context. - * - * @api - */ - public function setContext(RequestContext $context) { - $this->context = $context; - } - - /** - * Gets the request context. - * - * This method is just to satisfy the interface, and is largely vestigial. - * The request context object does not contain the information we need, so - * we will use the original request object. - * - * @return Symfony\Component\Routing\RequestContext - * The context. - */ - public function getContext() { - return $this->context; - } - - /** - * Sets the request object to use. - * - * This is used by the RouterListener to make additional request attributes - * available. - * - * @param Symfony\Component\HttpFoundation\Request $request - * The request object. - */ - public function setRequest(Request $request) { - $this->request = $request; - } - - /** - * Gets the request object. - * - * @return Symfony\Component\HttpFoundation\Request $request - * The request object. - */ - public function getRequest() { - return $this->request; - } - - public function match($pathinfo) { - - } - -} \ No newline at end of file diff --git a/core/modules/system/lib/Drupal/system/Tests/Routing/UrlMatcherDumperTest.php b/core/modules/system/lib/Drupal/system/Tests/Routing/MatcherDumperTest.php similarity index 94% rename from core/modules/system/lib/Drupal/system/Tests/Routing/UrlMatcherDumperTest.php rename to core/modules/system/lib/Drupal/system/Tests/Routing/MatcherDumperTest.php index be1164ca7ef..cb99cf0efc5 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Routing/UrlMatcherDumperTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Routing/MatcherDumperTest.php @@ -12,12 +12,12 @@ use Symfony\Component\Routing\RouteCollection; use Drupal\simpletest\UnitTestBase; use Drupal\Core\Database\Database; -use Drupal\Core\Routing\UrlMatcherDumper; +use Drupal\Core\Routing\MatcherDumper; /** * Basic tests for the UrlMatcherDumper. */ -class UrlMatcherDumperTest extends UnitTestBase { +class MatcherDumperTest extends UnitTestBase { public static function getInfo() { return array( 'name' => 'Dumper tests', @@ -35,9 +35,9 @@ class UrlMatcherDumperTest extends UnitTestBase { */ function testCreate() { $connection = Database::getConnection(); - $dumper= new UrlMatcherDumper($connection); + $dumper= new MatcherDumper($connection); - $class_name = 'Drupal\Core\Routing\UrlMatcherDumper'; + $class_name = 'Drupal\Core\Routing\MatcherDumper'; $this->assertTrue($dumper instanceof $class_name, t('Dumper created successfully')); } @@ -46,7 +46,7 @@ class UrlMatcherDumperTest extends UnitTestBase { */ function testAddRoutes() { $connection = Database::getConnection(); - $dumper= new UrlMatcherDumper($connection); + $dumper= new MatcherDumper($connection); $route = new Route('test'); $collection = new RouteCollection(); @@ -67,7 +67,7 @@ class UrlMatcherDumperTest extends UnitTestBase { */ function testAddAdditionalRoutes() { $connection = Database::getConnection(); - $dumper= new UrlMatcherDumper($connection); + $dumper= new MatcherDumper($connection); $route = new Route('test'); $collection = new RouteCollection(); @@ -103,7 +103,7 @@ class UrlMatcherDumperTest extends UnitTestBase { */ public function testDump() { $connection = Database::getConnection(); - $dumper= new UrlMatcherDumper($connection, 'test_routes'); + $dumper= new MatcherDumper($connection, 'test_routes'); $route = new Route('/test/{my}/path'); $route->setOption('compiler_class', 'Drupal\Core\Routing\RouteCompiler');