| 1 | <?php |
||
| 10 | class CachedProductStorage implements ProductStorageInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var ProductStorageInterface |
||
| 14 | */ |
||
| 15 | private $storage; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var array |
||
| 19 | */ |
||
| 20 | private $cache; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * CachedProductStorage constructor. |
||
| 24 | * @param ProductStorageInterface $storage |
||
| 25 | */ |
||
| 26 | 1 | public function __construct(ProductStorageInterface $storage) |
|
| 31 | |||
| 32 | |||
| 33 | /** |
||
| 34 | * @param int $id |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | 1 | public function getFromId(int $id): string |
|
| 48 | } |
||
| 49 |