| 1 | <?php |
||
| 7 | trait InteractsWithContext |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Get the whole context or a single value. |
||
| 11 | * |
||
| 12 | * @param string|null $key |
||
| 13 | * @param mixed $default |
||
| 14 | * |
||
| 15 | * @return array|mixed |
||
| 16 | */ |
||
| 17 | 2 | protected function context(string $key = null, $default = null) |
|
| 27 | |||
| 28 | /** |
||
| 29 | * Remember value in context. |
||
| 30 | * |
||
| 31 | * @param string $key |
||
| 32 | * @param mixed $value |
||
| 33 | */ |
||
| 34 | 1 | protected function remember(string $key, $value): void |
|
| 40 | } |
||
| 41 |