| 1 | <?php |
||
| 20 | abstract class AbstractCache implements CacheInterface |
||
| 21 | { |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var CacheStorageInterface Cache Storage |
||
| 25 | */ |
||
| 26 | protected $cache; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Creates a new instance of Cache with CacheStorageInterface. |
||
| 30 | * |
||
| 31 | * @param CacheStorageInterface|null $cacheStorage |
||
| 32 | */ |
||
| 33 | 26 | public function __construct(CacheStorageInterface $cacheStorage = null) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * Create new instance with $CacheStorage |
||
| 44 | * |
||
| 45 | * @param CacheStorageInterface $cacheStorage |
||
| 46 | * @return CacheInterface |
||
| 47 | */ |
||
| 48 | 1 | public function withCacheStorage(CacheStorageInterface $cacheStorage) |
|
| 54 | |||
| 55 | /** |
||
| 56 | * Get Cache Storage |
||
| 57 | * |
||
| 58 | * @return CacheStorageInterface |
||
| 59 | */ |
||
| 60 | 4 | public function getCacheStorage() |
|
| 64 | } |
||
| 65 |