@@ -15,6 +15,11 @@ discard block |
||
15 | 15 | } |
16 | 16 | |
17 | 17 | // just here for Memcache compatibilty |
18 | + |
|
19 | + /** |
|
20 | + * @param boolean $host |
|
21 | + * @param boolean $port |
|
22 | + */ |
|
18 | 23 | public function pconnect($host, $port):bool |
19 | 24 | { |
20 | 25 | return true; |
@@ -29,6 +34,10 @@ discard block |
||
29 | 34 | return unlink($path); |
30 | 35 | } |
31 | 36 | |
37 | + /** |
|
38 | + * @param integer $flag |
|
39 | + * @param integer $expire |
|
40 | + */ |
|
32 | 41 | public function set($key, $value, $flag, $expire):bool |
33 | 42 | { |
34 | 43 | $path = $this->getKeyFilePath($key); |
@@ -36,6 +36,9 @@ discard block |
||
36 | 36 | private $port = false; |
37 | 37 | private $root; |
38 | 38 | |
39 | + /** |
|
40 | + * @param string $root |
|
41 | + */ |
|
39 | 42 | public function __construct($root) |
40 | 43 | { |
41 | 44 | $this->root = $root; |
@@ -76,6 +79,11 @@ discard block |
||
76 | 79 | $this->engine = new FileCache($this->root); |
77 | 80 | } |
78 | 81 | |
82 | + /** |
|
83 | + * @param string $key |
|
84 | + * |
|
85 | + * @return boolean |
|
86 | + */ |
|
79 | 87 | public function delete($key, $timeout = 0) |
80 | 88 | { |
81 | 89 | $result = @$this->engine->pconnect($this->host, $this->port); |
@@ -86,6 +94,12 @@ discard block |
||
86 | 94 | return $this->engine->delete($key, $timeout); |
87 | 95 | } |
88 | 96 | |
97 | + /** |
|
98 | + * @param string $key |
|
99 | + * @param string $value |
|
100 | + * |
|
101 | + * @return boolean |
|
102 | + */ |
|
89 | 103 | public function set($key, $value, $expire = 0, $flag = 2) |
90 | 104 | { |
91 | 105 | $result = @$this->engine->pconnect($this->host, $this->port); |
@@ -96,6 +110,11 @@ discard block |
||
96 | 110 | return $this->engine->set($key, $value, $flag, $expire); |
97 | 111 | } |
98 | 112 | |
113 | + /** |
|
114 | + * @param string $key |
|
115 | + * |
|
116 | + * @return boolean |
|
117 | + */ |
|
99 | 118 | public function get($key, $flag = 2) |
100 | 119 | { |
101 | 120 | $result = @$this->engine->pconnect($this->host, $this->port); |
@@ -106,6 +125,9 @@ discard block |
||
106 | 125 | return $this->engine->get($key, $flag); |
107 | 126 | } |
108 | 127 | |
128 | + /** |
|
129 | + * @param string $key |
|
130 | + */ |
|
109 | 131 | public function getSetGet($key, Closure $callback, $ttl = 0, $flag = 2) |
110 | 132 | { |
111 | 133 | $result = @$this->engine->pconnect($this->host, $this->port); |