| 1 | <?php |
||
| 6 | trait StateAwareTrait |
||
| 7 | { |
||
| 8 | protected $state; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * {@inheritdoc} |
||
| 12 | */ |
||
| 13 | public function getState() |
||
| 17 | |||
| 18 | /** |
||
| 19 | * {@inheritdoc} |
||
| 20 | */ |
||
| 21 | public function setState(Data $state) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | */ |
||
| 29 | public function setStateValue($key, $value) |
||
| 30 | { |
||
| 31 | $this->state[$key] = $value; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * {@inheritdoc} |
||
| 36 | */ |
||
| 37 | public function updateState(Data $update) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * {@inheritdoc} |
||
| 44 | */ |
||
| 45 | public function resetState() |
||
| 49 | } |
||
| 50 |