Add RouteTableInterface
This commit is contained in:
parent
918e33bd0a
commit
f788d9a2f3
|
|
@ -8,7 +8,7 @@ use WellRESTed\Routing\Route\PrefixRouteInterface;
|
||||||
use WellRESTed\Routing\Route\RouteInterface;
|
use WellRESTed\Routing\Route\RouteInterface;
|
||||||
use WellRESTed\Routing\Route\StaticRouteInterface;
|
use WellRESTed\Routing\Route\StaticRouteInterface;
|
||||||
|
|
||||||
class RouteTable implements MiddlewareInterface
|
class RouteTable implements MiddlewareInterface, RouteTableInterface
|
||||||
{
|
{
|
||||||
/** @var RouteInterface[] Array of Route objects */
|
/** @var RouteInterface[] Array of Route objects */
|
||||||
private $routes;
|
private $routes;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace WellRESTed\Routing;
|
||||||
|
|
||||||
|
use WellRESTed\Routing\Route\PrefixRouteInterface;
|
||||||
|
use WellRESTed\Routing\Route\RouteInterface;
|
||||||
|
use WellRESTed\Routing\Route\StaticRouteInterface;
|
||||||
|
|
||||||
|
interface RouteTableInterface
|
||||||
|
{
|
||||||
|
public function addRoute(RouteInterface $route);
|
||||||
|
|
||||||
|
public function addStaticRoute(StaticRouteInterface $staticRoute);
|
||||||
|
|
||||||
|
public function addPrefixRoute(PrefixRouteInterface $prefxRoute);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue