1 | <?php |
||
18 | class RequestStack |
||
19 | { |
||
20 | /** |
||
21 | * @var RequestInterface[] |
||
22 | */ |
||
23 | private $stack = array(); |
||
24 | |||
25 | /** |
||
26 | * @param RequestInterface $request |
||
27 | */ |
||
28 | public function push(RequestInterface $request) |
||
32 | |||
33 | /** |
||
34 | * @return RequestInterface |
||
35 | */ |
||
36 | public function pop() |
||
40 | |||
41 | /** |
||
42 | * Check if this request is the master request. |
||
43 | * |
||
44 | * @return bool |
||
45 | */ |
||
46 | public function isMasterRequest() |
||
50 | |||
51 | /** |
||
52 | * Get the master request, or null if no requests are being handled. |
||
53 | * |
||
54 | * @return null|RequestInterface |
||
55 | */ |
||
56 | public function getMasterRequest() |
||
60 | } |
||
61 |