| 1 | <?php |
||
| 5 | class ExecutionContext implements \ArrayAccess |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var array |
||
| 9 | */ |
||
| 10 | private $data = []; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @param array $data The context data. |
||
| 14 | */ |
||
| 15 | public function __construct(array $data = []) |
||
| 19 | |||
| 20 | public function get($key, $default = null) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Get a data. |
||
| 31 | * |
||
| 32 | * @param string $key Key. |
||
| 33 | * |
||
| 34 | * @return mixed |
||
| 35 | */ |
||
| 36 | public function offsetGet($key) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Check if a data exists. |
||
| 47 | * |
||
| 48 | * @param string $key Key. |
||
| 49 | * |
||
| 50 | * @return bool |
||
| 51 | */ |
||
| 52 | public function offsetExists($key) |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Set a data. |
||
| 59 | * |
||
| 60 | * @param string $key Key. |
||
| 61 | * @param mixed $value Value. |
||
| 62 | */ |
||
| 63 | public function offsetSet($key, $value) |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Unset a data. |
||
| 70 | * |
||
| 71 | * @param string $key Key. |
||
| 72 | */ |
||
| 73 | public function offsetUnset($key) |
||
| 77 | } |
||
| 78 |