1 | <?php |
||
7 | class ExecutionContext implements \ArrayAccess |
||
8 | { |
||
9 | /** |
||
10 | * @var array |
||
11 | */ |
||
12 | private $data; |
||
13 | |||
14 | /** |
||
15 | * @param array $data The context data. |
||
16 | */ |
||
17 | public function __construct(array $data = []) |
||
21 | |||
22 | public function get(string $key, $default = null) |
||
30 | |||
31 | /** |
||
32 | * Get a data. |
||
33 | * |
||
34 | * @param string $key Key. |
||
35 | * |
||
36 | * @return mixed |
||
37 | */ |
||
38 | public function offsetGet($key) |
||
46 | |||
47 | /** |
||
48 | * Check if a data exists. |
||
49 | * |
||
50 | * @param string $key Key. |
||
51 | * |
||
52 | * @return bool |
||
53 | */ |
||
54 | public function offsetExists($key) |
||
58 | |||
59 | /** |
||
60 | * Set a data. |
||
61 | * |
||
62 | * @param string $key Key. |
||
63 | * @param mixed $value Value. |
||
64 | */ |
||
65 | public function offsetSet($key, $value) |
||
69 | |||
70 | /** |
||
71 | * Unset a data. |
||
72 | * |
||
73 | * @param string $key Key. |
||
74 | */ |
||
75 | public function offsetUnset($key) |
||
79 | } |
||
80 |