| Total Complexity | 6 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class OfflineStorageAdapter |
||
| 8 | { |
||
| 9 | const DI_VALUE_PREFIX = 'DI_VALUE:'; |
||
| 10 | const DI_ALIAS_PREFIX = 'DI_ALIAS:'; |
||
| 11 | |||
| 12 | /** @var OfflineStorage $storage The real scope storage. */ |
||
| 13 | private $storage; |
||
| 14 | |||
| 15 | /** @param OfflineStorage $storage The real scope storage */ |
||
| 16 | public function __construct(OfflineStorage $storage) { |
||
| 17 | $this->storage = $storage; |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Try to read the requested dependency from the storage by its name or by an alias. |
||
| 22 | * |
||
| 23 | * @param string $name Dependency name. |
||
| 24 | * @return mixed|null Retrieved value or null if not previously stored. |
||
| 25 | */ |
||
| 26 | public function fetch($name) { |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Unpacks the supplied bean, saves the value under the main name, as well as under its aliases. |
||
| 40 | * |
||
| 41 | * @param Bean $bean Wrapped dependency. |
||
| 42 | * @return mixed Unwrapped dependency value. |
||
| 43 | */ |
||
| 44 | public function store(Bean $bean) { |
||
| 50 | } |
||
| 51 | } |