Skip to content
Permalink
Browse files

interface Nette\Application\IRouter is alias for Nette\Routing\Router

  • Loading branch information
dg committed Mar 10, 2020
1 parent f6496df commit acda0f32189c723bd5b5adb82835df1a8fa68600

This file was deleted.

@@ -10,13 +10,12 @@
namespace Nette\Application\Routers;

use Nette;
use Nette\Application;


/**
* The unidirectional router for CLI. (experimental)
*/
final class CliRouter implements Application\IRouter
final class CliRouter implements Nette\Routing\Router
{
use Nette\SmartObject;

@@ -16,7 +16,7 @@
* The bidirectional route is responsible for mapping
* HTTP request to an array for dispatch and vice-versa.
*/
class Route extends Nette\Routing\Route implements Nette\Application\IRouter
class Route extends Nette\Routing\Route implements Nette\Routing\Router
{
private const
PRESENTER_KEY = 'presenter',
@@ -15,7 +15,7 @@
/**
* The router broker.
*/
class RouteList extends Nette\Routing\RouteList implements Nette\Application\IRouter, \ArrayAccess, \Countable, \IteratorAggregate
class RouteList extends Nette\Routing\RouteList implements Nette\Routing\Router, \ArrayAccess, \Countable, \IteratorAggregate
{
private const PRESENTER_KEY = 'presenter';

@@ -16,7 +16,7 @@
/**
* The bidirectional route for trivial routing via query parameters.
*/
final class SimpleRouter extends Nette\Routing\SimpleRouter implements Nette\Application\IRouter
final class SimpleRouter extends Nette\Routing\SimpleRouter implements Nette\Routing\Router
{
private const
PRESENTER_KEY = 'presenter',
@@ -46,7 +46,7 @@ public function loadConfiguration()
$builder = $this->getContainerBuilder();

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

foreach ($this->config->routes as $mask => $action) {
@@ -0,0 +1,19 @@
<?php

/**
* This file is part of the Nette Framework (https://nette.org)
* Copyright (c) 2004 David Grudl (https://davidgrudl.com)
*/

declare(strict_types=1);

namespace Nette\Application {
if (false) {
/** @deprecated use Nette\Routing\Router */
interface IRouter
{
}
} elseif (!interface_exists(IRouter::class)) {
class_alias(\Nette\Routing\Router::class, IRouter::class);
}
}

0 comments on commit acda0f3

Please sign in to comment.
You can’t perform that action at this time.