| 1 | <?php |
||
| 7 | class Value |
||
| 8 | { |
||
| 9 | /*** @var mixed */ |
||
| 10 | protected $result; |
||
| 11 | |||
| 12 | /*** @var int */ |
||
| 13 | protected $expirationTimestamp; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param mixed |
||
| 17 | * @param int |
||
| 18 | */ |
||
| 19 | public function __construct($result, $expirationTimestamp) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @return mixed |
||
| 27 | */ |
||
| 28 | public function getResult() |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return bool |
||
| 35 | */ |
||
| 36 | public function hasResult() |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param int (optional) |
||
| 43 | * @param bool |
||
| 44 | */ |
||
| 45 | public function isStale($nowTimestamp = null) |
||
| 53 | |||
| 54 | public function __toString() |
||
| 58 | } |
||
| 59 |