| 1 | <?php |
||
| 9 | class TextCacheItem implements CacheItemInterface |
||
| 10 | { |
||
| 11 | /** @var string **/ |
||
| 12 | protected $key; |
||
| 13 | /** @var mixed **/ |
||
| 14 | protected $value; |
||
| 15 | /** @var int **/ |
||
| 16 | protected $defaultLifetime = 3600; |
||
| 17 | /** @var \DateTime **/ |
||
| 18 | protected $expiresAt; |
||
| 19 | /** @var string **/ |
||
| 20 | protected $driver = 'text'; |
||
| 21 | |||
| 22 | 17 | public function __construct(string $key, int $ttl = null) |
|
| 27 | |||
| 28 | 7 | public function set($value): TextCacheItem |
|
| 34 | |||
| 35 | 14 | public function isHit(): bool |
|
| 39 | |||
| 40 | 11 | public function getKey(): string |
|
| 44 | |||
| 45 | 12 | public function get() |
|
| 52 | |||
| 53 | 17 | public function expiresAfter($time): TextCacheItem |
|
| 61 | |||
| 62 | 7 | public function expiresAt($expiration): TextCacheItem |
|
| 71 | |||
| 72 | 11 | public function getExpirationDate(): \DateTime |
|
| 76 | |||
| 77 | public function getDriver(): string |
||
| 81 | } |
||
| 82 |