1 | <?php |
||
31 | class StorageHandler extends ObjectAbstract implements SessionHandlerInterface |
||
32 | { |
||
33 | /** |
||
34 | * @var StorageInterface |
||
35 | * @access protected |
||
36 | */ |
||
37 | protected $storage; |
||
38 | |||
39 | /** |
||
40 | * Path prefix in the storage |
||
41 | * |
||
42 | * @var string |
||
43 | * @access protected |
||
44 | */ |
||
45 | protected $path_prefix; |
||
46 | |||
47 | /** |
||
48 | * @param StorageInterface $storage |
||
49 | * @param string $path |
||
50 | * @access public |
||
51 | */ |
||
52 | public function __construct( |
||
59 | |||
60 | /** |
||
61 | * {@inheritDoc} |
||
62 | * |
||
63 | * @return bool |
||
64 | * @see SessionHandlerInterface::close() |
||
65 | */ |
||
66 | public function close()/*# : bool */ |
||
70 | |||
71 | /** |
||
72 | * {@inheritDoc} |
||
73 | * |
||
74 | * @param string $session_id |
||
75 | * @return bool |
||
76 | * @see SessionHandlerInterface::destroy() |
||
77 | */ |
||
78 | public function destroy(/*# string */ $session_id)/*# : bool */ |
||
83 | |||
84 | /** |
||
85 | * {@inheritDoc} |
||
86 | * |
||
87 | * @param int $maxlifetime |
||
88 | * @return bool |
||
89 | * @see SessionHandlerInterface::gc() |
||
90 | */ |
||
91 | public function gc(/*# int */ $maxlifetime)/*# : bool */ |
||
95 | |||
96 | /** |
||
97 | * {@inheritDoc} |
||
98 | * |
||
99 | * @param string $save_path |
||
100 | * @param string $session_name |
||
101 | * @return bool |
||
102 | * @see SessionHandlerInterface::open() |
||
103 | */ |
||
104 | public function open( |
||
110 | |||
111 | /** |
||
112 | * {@inheritDoc} |
||
113 | * |
||
114 | * @param string $session_id |
||
115 | * @return string |
||
116 | * @see SessionHandlerInterface::read() |
||
117 | */ |
||
118 | public function read(/*# string */ $session_id)/*# : string */ |
||
127 | |||
128 | /** |
||
129 | * {@inheritDoc} |
||
130 | * |
||
131 | * @param string $session_id |
||
132 | * @param string $session_data |
||
133 | * @return bool |
||
134 | * @see SessionHandlerInterface::write() |
||
135 | */ |
||
136 | public function write( |
||
143 | |||
144 | /** |
||
145 | * Return the path in the $this->storage of this session id |
||
146 | * |
||
147 | * @param string $session_id |
||
148 | * @return string |
||
149 | * @access protected |
||
150 | */ |
||
151 | protected function getSessionFile(/*# string */ $session_id)/*# : string */ |
||
166 | } |
||
167 |