| 1 | <?php |
||
| 8 | class MiddlewareStack implements MiddlewareStackInterface |
||
| 9 | { |
||
| 10 | use CallableMiddlewareStackTrait; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Create new stack. |
||
| 14 | * |
||
| 15 | * @param callable $bottomMiddleware last middleware to be called |
||
| 16 | */ |
||
| 17 | public function __construct(callable $bottomMiddleware = null) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Push a middleware onto the top of a new Stack instance. |
||
| 24 | * |
||
| 25 | * @param callable $newTopMiddleware the middleware to be pushed onto the top. |
||
| 26 | * |
||
| 27 | * @return static the new instance |
||
| 28 | */ |
||
| 29 | public function add(callable $newTopMiddleware) |
||
| 35 | } |
||
| 36 |