Add RouteTableInterface

This commit is contained in:
PJ Dietz 2015-04-02 21:56:12 -04:00
parent 918e33bd0a
commit f788d9a2f3
2 changed files with 17 additions and 1 deletions

View File

@ -8,7 +8,7 @@ use WellRESTed\Routing\Route\PrefixRouteInterface;
use WellRESTed\Routing\Route\RouteInterface;
use WellRESTed\Routing\Route\StaticRouteInterface;
class RouteTable implements MiddlewareInterface
class RouteTable implements MiddlewareInterface, RouteTableInterface
{
/** @var RouteInterface[] Array of Route objects */
private $routes;

View File

@ -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);
}