Move MiddlewareInterface to the root namespace.

This commit is contained in:
PJ Dietz 2015-05-10 11:21:55 -04:00
parent bbb138996a
commit 8071b0b5db
11 changed files with 15 additions and 10 deletions

View File

@ -4,7 +4,7 @@ namespace WellRESTed\Dispatching;
use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;
use WellRESTed\Routing\MiddlewareInterface; use WellRESTed\MiddlewareInterface;
interface DispatchStackInterface extends MiddlewareInterface interface DispatchStackInterface extends MiddlewareInterface
{ {

View File

@ -4,7 +4,7 @@ namespace WellRESTed\Dispatching;
use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;
use WellRESTed\Routing\MiddlewareInterface; use WellRESTed\MiddlewareInterface;
class Dispatcher implements DispatcherInterface class Dispatcher implements DispatcherInterface
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace WellRESTed\Routing; namespace WellRESTed;
use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;

View File

@ -4,7 +4,7 @@ namespace WellRESTed\Routing\Hook;
use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;
use WellRESTed\Routing\MiddlewareInterface; use WellRESTed\MiddlewareInterface;
/** /**
* Adds a Content-length header to the response when all of these are true: * Adds a Content-length header to the response when all of these are true:

View File

@ -5,7 +5,7 @@ namespace WellRESTed\Routing\Hook;
use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;
use WellRESTed\Message\NullStream; use WellRESTed\Message\NullStream;
use WellRESTed\Routing\MiddlewareInterface; use WellRESTed\MiddlewareInterface;
/** /**
* Removes the body of a response to a HEAD request. * Removes the body of a response to a HEAD request.

View File

@ -6,6 +6,7 @@ use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;
use WellRESTed\Dispatching\Dispatcher; use WellRESTed\Dispatching\Dispatcher;
use WellRESTed\Dispatching\DispatcherInterface; use WellRESTed\Dispatching\DispatcherInterface;
use WellRESTed\MiddlewareInterface;
class MethodMap implements MiddlewareInterface, MethodMapInterface class MethodMap implements MiddlewareInterface, MethodMapInterface
{ {

View File

@ -2,6 +2,8 @@
namespace WellRESTed\Routing; namespace WellRESTed\Routing;
use WellRESTed\MiddlewareInterface;
interface MethodMapInterface extends MiddlewareInterface interface MethodMapInterface extends MiddlewareInterface
{ {
/** /**

View File

@ -2,8 +2,8 @@
namespace WellRESTed\Routing\Route; namespace WellRESTed\Routing\Route;
use WellRESTed\MiddlewareInterface;
use WellRESTed\Routing\MethodMapInterface; use WellRESTed\Routing\MethodMapInterface;
use WellRESTed\Routing\MiddlewareInterface;
interface RouteInterface extends MiddlewareInterface interface RouteInterface extends MiddlewareInterface
{ {

View File

@ -2,6 +2,8 @@
namespace WellRESTed\Routing; namespace WellRESTed\Routing;
use WellRESTed\MiddlewareInterface;
interface RouterInterface extends MiddlewareInterface interface RouterInterface extends MiddlewareInterface
{ {
/** /**

View File

@ -6,7 +6,7 @@ use Prophecy\Argument;
use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;
use WellRESTed\Dispatching\Dispatcher; use WellRESTed\Dispatching\Dispatcher;
use WellRESTed\Routing\MiddlewareInterface; use WellRESTed\MiddlewareInterface;
/** /**
* @covers WellRESTed\Dispatching\Dispatcher * @covers WellRESTed\Dispatching\Dispatcher

View File

@ -26,7 +26,7 @@ class MethodMapTest extends \PHPUnit_Framework_TestCase
$this->next = function ($request, $response) { $this->next = function ($request, $response) {
return $response; return $response;
}; };
$this->middleware = $this->prophesize('WellRESTed\Routing\MiddlewareInterface'); $this->middleware = $this->prophesize('WellRESTed\MiddlewareInterface');
$this->middleware->dispatch(Argument::cetera())->willReturn(); $this->middleware->dispatch(Argument::cetera())->willReturn();
} }
@ -63,10 +63,10 @@ class MethodMapTest extends \PHPUnit_Framework_TestCase
{ {
$this->request->getMethod()->willReturn("get"); $this->request->getMethod()->willReturn("get");
$middlewareUpper = $this->prophesize('WellRESTed\Routing\MiddlewareInterface'); $middlewareUpper = $this->prophesize('WellRESTed\MiddlewareInterface');
$middlewareUpper->dispatch(Argument::cetera())->willReturn(); $middlewareUpper->dispatch(Argument::cetera())->willReturn();
$middlewareLower = $this->prophesize('WellRESTed\Routing\MiddlewareInterface'); $middlewareLower = $this->prophesize('WellRESTed\MiddlewareInterface');
$middlewareLower->dispatch(Argument::cetera())->willReturn(); $middlewareLower->dispatch(Argument::cetera())->willReturn();
$map = new MethodMap(); $map = new MethodMap();