| Total Complexity | 4 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class DatabagContext |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var Databag |
||
| 9 | */ |
||
| 10 | protected $xDatabag; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $sName; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * The constructor |
||
| 19 | * |
||
| 20 | * @param Databag $xDatabag |
||
| 21 | * @param string $sName |
||
| 22 | */ |
||
| 23 | public function __construct(Databag $xDatabag, string $sName) |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param string $sKey |
||
| 31 | * @param mixed $xValue |
||
| 32 | * |
||
| 33 | * @return void |
||
| 34 | */ |
||
| 35 | public function set(string $sKey, $xValue): void |
||
| 36 | { |
||
| 37 | $this->xDatabag->set($this->sName, $sKey, $xValue); |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param string $sKey |
||
| 42 | * @param mixed $xValue |
||
| 43 | * |
||
| 44 | * @return void |
||
| 45 | */ |
||
| 46 | public function new(string $sKey, $xValue): void |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @param string $sKey |
||
| 53 | * @param mixed $xValue |
||
| 54 | * |
||
| 55 | * @return mixed |
||
| 56 | */ |
||
| 57 | public function get(string $sKey, $xValue = null): mixed |
||
| 60 | } |
||
| 61 | } |
||
| 62 |