-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2817 from l0gicgate/MiddlewareDispatcherInterface
4.x - MiddlewareDispatcherInterface
- Loading branch information
Showing
6 changed files
with
168 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/** | ||
* Slim Framework (https://slimframework.com) | ||
* | ||
* @license https://github.com/slimphp/Slim/blob/4.x/LICENSE.md (MIT License) | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Slim\Interfaces; | ||
|
||
use Psr\Http\Server\MiddlewareInterface; | ||
use Psr\Http\Server\RequestHandlerInterface; | ||
|
||
interface MiddlewareDispatcherInterface extends RequestHandlerInterface | ||
{ | ||
/** | ||
* Add a new middleware to the stack | ||
* | ||
* Middleware are organized as a stack. That means middleware | ||
* that have been added before will be executed after the newly | ||
* added one (last in, first out). | ||
* | ||
* @param MiddlewareInterface|string|callable $middleware | ||
* @return self | ||
*/ | ||
public function add($middleware): self; | ||
|
||
/** | ||
* Add a new middleware to the stack | ||
* | ||
* Middleware are organized as a stack. That means middleware | ||
* that have been added before will be executed after the newly | ||
* added one (last in, first out). | ||
* | ||
* @param MiddlewareInterface $middleware | ||
* @return self | ||
*/ | ||
public function addMiddleware(MiddlewareInterface $middleware): self; | ||
|
||
/** | ||
* Seed the middleware stack with the inner request handler | ||
* | ||
* @param RequestHandlerInterface $kernel | ||
* @return void | ||
*/ | ||
public function seedMiddlewareStack(RequestHandlerInterface $kernel): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.