1 | <?php |
||
15 | abstract class Storage { |
||
16 | |||
17 | protected $keyLifetime = 60; |
||
18 | |||
19 | /** |
||
20 | * Get postponed data from storage and delete |
||
21 | * @param string $key |
||
22 | * @return string |
||
23 | */ |
||
24 | abstract public function pop($key); |
||
25 | |||
26 | /** |
||
27 | * Save postponed data to storage |
||
28 | * @param string $key |
||
29 | * @param string $data |
||
30 | */ |
||
31 | abstract public function push($key, $data); |
||
32 | |||
33 | /** |
||
34 | * Set maximum key lifetime in seconds |
||
35 | * @param int $seconds |
||
36 | */ |
||
37 | 2 | public function setKeyLifetime($seconds) { |
|
40 | } |
||
41 |