| 1 | <?php |
||
| 22 | trait CacheAdapterTrait |
||
| 23 | { |
||
| 24 | /** @var CacheAdapterInterface */ |
||
| 25 | protected static $adapter; |
||
| 26 | /** @var string|CacheAdapterAbstract */ |
||
| 27 | protected static $adapter_name; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Set cache adapter initialisation |
||
| 31 | * |
||
| 32 | * @param CacheAdapterInterface $adapter Adapter |
||
| 33 | */ |
||
| 34 | public static function setAdapter(CacheAdapterInterface $adapter) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Get cache adapter instance |
||
| 41 | * |
||
| 42 | * @throws Exception |
||
| 43 | * @return CacheAdapterInterface |
||
| 44 | */ |
||
| 45 | public static function getAdapter() |
||
| 53 | } |
||
| 54 |