/var/www/hkosl.com/b2b2c/webadmin/libraies/php-console/php-console/src/PhpConsole/Storage.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php

namespace PhpConsole;

/**
 * Storage for postponed response data
 *
 * @package PhpConsole
 * @version 3.1
 * @link http://php-console.com
 * @author Sergey Barbushin http://linkedin.com/in/barbushin
 * @copyright © Sergey Barbushin, 2011-2013. All rights reserved.
 * @license http://www.opensource.org/licenses/BSD-3-Clause "The BSD 3-Clause License"
 */
abstract class Storage {

    protected 
$keyLifetime 60;

    
/**
     * Get postponed data from storage and delete
     * @param string $key
     * @return string
     */
    
abstract public function pop($key);

    
/**
     * Save postponed data to storage
     * @param string $key
     * @param string $data
     */
    
abstract public function push($key$data);

    
/**
     * Set maximum key lifetime in seconds
     * @param int $seconds
     */
    
public function setKeyLifetime($seconds) {
        
$this->keyLifetime $seconds;
    }
}