Move MiddlewareInterface to the root namespace.
This commit is contained in:
parent
bbb138996a
commit
8071b0b5db
|
|
@ -4,7 +4,7 @@ namespace WellRESTed\Dispatching;
|
|||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use WellRESTed\Routing\MiddlewareInterface;
|
||||
use WellRESTed\MiddlewareInterface;
|
||||
|
||||
interface DispatchStackInterface extends MiddlewareInterface
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ namespace WellRESTed\Dispatching;
|
|||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use WellRESTed\Routing\MiddlewareInterface;
|
||||
use WellRESTed\MiddlewareInterface;
|
||||
|
||||
class Dispatcher implements DispatcherInterface
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WellRESTed\Routing;
|
||||
namespace WellRESTed;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
|
@ -4,7 +4,7 @@ namespace WellRESTed\Routing\Hook;
|
|||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
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:
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ namespace WellRESTed\Routing\Hook;
|
|||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use WellRESTed\Message\NullStream;
|
||||
use WellRESTed\Routing\MiddlewareInterface;
|
||||
use WellRESTed\MiddlewareInterface;
|
||||
|
||||
/**
|
||||
* Removes the body of a response to a HEAD request.
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ use Psr\Http\Message\ResponseInterface;
|
|||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use WellRESTed\Dispatching\Dispatcher;
|
||||
use WellRESTed\Dispatching\DispatcherInterface;
|
||||
use WellRESTed\MiddlewareInterface;
|
||||
|
||||
class MethodMap implements MiddlewareInterface, MethodMapInterface
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace WellRESTed\Routing;
|
||||
|
||||
use WellRESTed\MiddlewareInterface;
|
||||
|
||||
interface MethodMapInterface extends MiddlewareInterface
|
||||
{
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace WellRESTed\Routing\Route;
|
||||
|
||||
use WellRESTed\MiddlewareInterface;
|
||||
use WellRESTed\Routing\MethodMapInterface;
|
||||
use WellRESTed\Routing\MiddlewareInterface;
|
||||
|
||||
interface RouteInterface extends MiddlewareInterface
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace WellRESTed\Routing;
|
||||
|
||||
use WellRESTed\MiddlewareInterface;
|
||||
|
||||
interface RouterInterface extends MiddlewareInterface
|
||||
{
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use Prophecy\Argument;
|
|||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use WellRESTed\Dispatching\Dispatcher;
|
||||
use WellRESTed\Routing\MiddlewareInterface;
|
||||
use WellRESTed\MiddlewareInterface;
|
||||
|
||||
/**
|
||||
* @covers WellRESTed\Dispatching\Dispatcher
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class MethodMapTest extends \PHPUnit_Framework_TestCase
|
|||
$this->next = function ($request, $response) {
|
||||
return $response;
|
||||
};
|
||||
$this->middleware = $this->prophesize('WellRESTed\Routing\MiddlewareInterface');
|
||||
$this->middleware = $this->prophesize('WellRESTed\MiddlewareInterface');
|
||||
$this->middleware->dispatch(Argument::cetera())->willReturn();
|
||||
}
|
||||
|
||||
|
|
@ -63,10 +63,10 @@ class MethodMapTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$this->request->getMethod()->willReturn("get");
|
||||
|
||||
$middlewareUpper = $this->prophesize('WellRESTed\Routing\MiddlewareInterface');
|
||||
$middlewareUpper = $this->prophesize('WellRESTed\MiddlewareInterface');
|
||||
$middlewareUpper->dispatch(Argument::cetera())->willReturn();
|
||||
|
||||
$middlewareLower = $this->prophesize('WellRESTed\Routing\MiddlewareInterface');
|
||||
$middlewareLower = $this->prophesize('WellRESTed\MiddlewareInterface');
|
||||
$middlewareLower->dispatch(Argument::cetera())->willReturn();
|
||||
|
||||
$map = new MethodMap();
|
||||
|
|
|
|||
Loading…
Reference in New Issue