Total Complexity | 6 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | trait GlobalStorage |
||
9 | { |
||
10 | /** @var OfflineStorageAdapter $globalStorage Scope storage implementation */ |
||
11 | private $globalStorage; |
||
12 | |||
13 | /** Init the scope storage. Get the underlying storage implementation from factory method */ |
||
14 | protected function initGlobal() { |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * Try to read the requested dependency from the storage |
||
24 | * |
||
25 | * @param string $name Dependency name. |
||
26 | * @return mixed Retrieved value or null if not previously stored. |
||
27 | */ |
||
28 | protected function fromGlobal(string $name) { |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Save the dependency to the storage. |
||
34 | * |
||
35 | * @param Bean $bean Dependency to be stored. |
||
36 | * @return mixed Stored value from the supplied bean. |
||
37 | */ |
||
38 | protected function toGlobal(Bean $bean) { |
||
43 | } |
||
44 | } |