| 1 | <?php |
||
| 7 | class NoStaleCacheEvent |
||
| 8 | { |
||
| 9 | protected $cache; |
||
| 10 | |||
| 11 | protected $key; |
||
| 12 | |||
| 13 | protected $cachedCallable; |
||
| 14 | |||
| 15 | protected $ttl; |
||
| 16 | |||
| 17 | protected $result = null; |
||
| 18 | |||
| 19 | public function __construct(Cache $cache, $key, callable $cachedCallable, Ttl $ttl) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return Cache |
||
| 29 | */ |
||
| 30 | public function getCache() |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | public function getKey() |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return callable |
||
| 45 | */ |
||
| 46 | public function getCachedCallable() |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return Ttl |
||
| 53 | */ |
||
| 54 | public function getTtl() |
||
| 58 | |||
| 59 | public function setResult($result) |
||
| 63 | |||
| 64 | public function hasResult() |
||
| 68 | |||
| 69 | public function getResult() |
||
| 73 | } |
||
| 74 |