1 | <?php |
||
28 | class Context implements \ArrayAccess |
||
29 | { |
||
30 | use PrototypeTrait; |
||
31 | |||
32 | /** |
||
33 | * The request the context belongs to. |
||
34 | * |
||
35 | * @var Request |
||
36 | */ |
||
37 | private $request; |
||
38 | |||
39 | /** |
||
40 | * @return Request |
||
41 | */ |
||
42 | protected function get_request() |
||
46 | |||
47 | /** |
||
48 | * The dispatcher currently dispatching the request. |
||
49 | * |
||
50 | * @var Dispatcher|null |
||
51 | */ |
||
52 | private $dispatcher; |
||
53 | |||
54 | /** |
||
55 | * Sets the dispatcher currently dispatching the request. |
||
56 | * |
||
57 | * @param Dispatcher|null $dispatcher |
||
58 | * |
||
59 | * @throws \InvalidArgumentException if the value is not null and does not implements {@link Dispatcher}. |
||
60 | */ |
||
61 | protected function set_dispatcher($dispatcher) |
||
70 | |||
71 | /** |
||
72 | * @return Dispatcher|null |
||
73 | */ |
||
74 | protected function get_dispatcher() |
||
78 | |||
79 | /** |
||
80 | * @param Request $request The request the context belongs to. |
||
81 | */ |
||
82 | public function __construct(Request $request) |
||
86 | |||
87 | /** |
||
88 | * @inheritdoc |
||
89 | */ |
||
90 | public function offsetExists($property) |
||
103 | |||
104 | /** |
||
105 | * @inheritdoc |
||
106 | */ |
||
107 | public function offsetGet($property) |
||
111 | |||
112 | /** |
||
113 | * @inheritdoc |
||
114 | */ |
||
115 | public function offsetSet($property, $value) |
||
119 | |||
120 | /** |
||
121 | * @inheritdoc |
||
122 | */ |
||
123 | public function offsetUnset($property) |
||
127 | } |
||
128 |