1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15:
16: class Horde_SessionHandler_Storage_External extends Horde_SessionHandler_Storage
17: {
18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32:
33: public function __construct(array $params = array())
34: {
35: foreach (array('open', 'close', 'read', 'write', 'destroy', 'gc') as $val) {
36: if (!isset($params[$val])) {
37: throw new InvalidArgumentException('Missing parameter: ' . $val);
38: }
39: }
40:
41: parent::__construct($params);
42: }
43:
44: 45:
46: public function open($save_path = null, $session_name = null)
47: {
48: call_user_func($this->_params['open'], $save_path, $session_name);
49: }
50:
51: 52:
53: public function close()
54: {
55: call_user_func($this->_params['close']);
56: }
57:
58: 59:
60: public function read($id)
61: {
62: return call_user_func($this->_params['read'], $id);
63: }
64:
65: 66:
67: public function write($id, $session_data)
68: {
69: return call_user_func($this->_params['write'], $id, $session_data);
70: }
71:
72: 73:
74: public function destroy($id)
75: {
76: return call_user_func($this->_params['destroy'], $id);
77: }
78:
79: 80:
81: public function gc($maxlifetime = 300)
82: {
83: return call_user_func($this->_params['gc'], $maxlifetime);
84: }
85:
86: 87: 88: 89: 90:
91: public function getSessionIDs()
92: {
93: throw new Horde_SessionHandler_Exception('Driver does not support listing session IDs.');
94: }
95:
96: }
97: