| Total Complexity | 6 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | trait SessionStorage |
||
| 9 | { |
||
| 10 | /** @var OfflineStorageAdapter $sessionStorage Scope storage implementation */ |
||
| 11 | private $sessionStorage; |
||
| 12 | |||
| 13 | /** Init the scope storage. Get the underlying storage implementation from factory method */ |
||
| 14 | protected function initSession() { |
||
| 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 fromSession(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 toSession(Bean $bean) { |
||
| 43 | } |
||
| 44 | } |