Skip to content

Commit c9e31aa

Browse files
committed
Renaming abstract method and going back to the key "service" as the type
1 parent e10bb2c commit c9e31aa

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Symfony/Component/Routing/Loader/DependencyInjection/ServiceRouterLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(ContainerInterface $container)
3737
$this->container = $container;
3838
}
3939

40-
protected function getRouteLoader($id)
40+
protected function getRouteLoaderService($id)
4141
{
4242
return $this->container->get($id);
4343
}

src/Symfony/Component/Routing/Loader/ObjectRouteLoader.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ abstract class ObjectRouteLoader extends Loader
3232
*/
3333
public function load($resource, $type = null)
3434
{
35-
$routeLoader = $this->getRouteLoader($resource);
35+
$routeLoader = $this->getRouteLoaderService($resource);
3636

3737
if (!$routeLoader instanceof RouteLoaderInterface) {
3838
throw new \LogicException(sprintf('Service "%s" must implement RouteLoaderInterface.', $resource));
@@ -53,7 +53,7 @@ public function load($resource, $type = null)
5353
*/
5454
public function supports($resource, $type = null)
5555
{
56-
return 'object' === $type;
56+
return 'service' === $type;
5757
}
5858

5959
/**
@@ -65,7 +65,7 @@ public function supports($resource, $type = null)
6565
* @param string $id
6666
* @return RouteLoaderInterface
6767
*/
68-
abstract protected function getRouteLoader($id);
68+
abstract protected function getRouteLoaderService($id);
6969

7070
private function addClassResource(\ReflectionClass $class, RouteCollection $collection)
7171
{

src/Symfony/Component/Routing/Tests/Loader/ObjectRouteLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class ObjectRouteLoaderForTest extends ObjectRouteLoader
6666
{
6767
public $loaderMap = array();
6868

69-
protected function getRouteLoader($id)
69+
protected function getRouteLoaderService($id)
7070
{
7171
return isset($this->loaderMap[$id]) ? $this->loaderMap[$id] : null;
7272
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy