Skip to content

Commit acda0f3

Browse files
committed
interface Nette\Application\IRouter is alias for Nette\Routing\Router
1 parent f6496df commit acda0f3

File tree

7 files changed

+24
-26
lines changed

7 files changed

+24
-26
lines changed

src/Application/IRouter.php

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/Application/Routers/CliRouter.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@
1010
namespace Nette\Application\Routers;
1111

1212
use Nette;
13-
use Nette\Application;
1413

1514

1615
/**
1716
* The unidirectional router for CLI. (experimental)
1817
*/
19-
final class CliRouter implements Application\IRouter
18+
final class CliRouter implements Nette\Routing\Router
2019
{
2120
use Nette\SmartObject;
2221

src/Application/Routers/Route.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* The bidirectional route is responsible for mapping
1717
* HTTP request to an array for dispatch and vice-versa.
1818
*/
19-
class Route extends Nette\Routing\Route implements Nette\Application\IRouter
19+
class Route extends Nette\Routing\Route implements Nette\Routing\Router
2020
{
2121
private const
2222
PRESENTER_KEY = 'presenter',

src/Application/Routers/RouteList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/**
1616
* The router broker.
1717
*/
18-
class RouteList extends Nette\Routing\RouteList implements Nette\Application\IRouter, \ArrayAccess, \Countable, \IteratorAggregate
18+
class RouteList extends Nette\Routing\RouteList implements Nette\Routing\Router, \ArrayAccess, \Countable, \IteratorAggregate
1919
{
2020
private const PRESENTER_KEY = 'presenter';
2121

src/Application/Routers/SimpleRouter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/**
1717
* The bidirectional route for trivial routing via query parameters.
1818
*/
19-
final class SimpleRouter extends Nette\Routing\SimpleRouter implements Nette\Application\IRouter
19+
final class SimpleRouter extends Nette\Routing\SimpleRouter implements Nette\Routing\Router
2020
{
2121
private const
2222
PRESENTER_KEY = 'presenter',

src/Bridges/ApplicationDI/RoutingExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function loadConfiguration()
4646
$builder = $this->getContainerBuilder();
4747

4848
$router = $builder->addDefinition($this->prefix('router'))
49-
->setType(Nette\Application\IRouter::class)
49+
->setType(Nette\Routing\Router::class)
5050
->setFactory(Nette\Application\Routers\RouteList::class);
5151

5252
foreach ($this->config->routes as $mask => $action) {

src/compatibility-intf.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
/**
4+
* This file is part of the Nette Framework (https://nette.org)
5+
* Copyright (c) 2004 David Grudl (https://davidgrudl.com)
6+
*/
7+
8+
declare(strict_types=1);
9+
10+
namespace Nette\Application {
11+
if (false) {
12+
/** @deprecated use Nette\Routing\Router */
13+
interface IRouter
14+
{
15+
}
16+
} elseif (!interface_exists(IRouter::class)) {
17+
class_alias(\Nette\Routing\Router::class, IRouter::class);
18+
}
19+
}

0 commit comments

Comments
 (0)