Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 1 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
| 2 | /** |
| 3 | * CodeIgniter |
| 4 | * |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 5 | * An open source application development framework for PHP 5.2.4 or newer |
| 6 | * |
| 7 | * NOTICE OF LICENSE |
| 8 | * |
| 9 | * Licensed under the Open Software License version 3.0 |
| 10 | * |
| 11 | * This source file is subject to the Open Software License (OSL 3.0) that is |
| 12 | * bundled with this package in the files license.txt / license.rst. It is |
| 13 | * also available through the world wide web at this URL: |
| 14 | * http://opensource.org/licenses/OSL-3.0 |
| 15 | * If you did not receive a copy of the license and are unable to obtain it |
| 16 | * through the world wide web, please send an email to |
| 17 | * licensing@ellislab.com so we can send you a copy immediately. |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 18 | * |
| 19 | * @package CodeIgniter |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 20 | * @author EllisLab Dev Team |
| 21 | * @copyright Copyright (c) 2006 - 2012 EllisLab, Inc. |
| 22 | * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 23 | * @link http://codeigniter.com |
| 24 | * @since Version 2.0 |
| 25 | * @filesource |
| 26 | */ |
| 27 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 28 | /** |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 29 | * CodeIgniter Session Class |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 30 | * |
| 31 | * The user interface defined by EllisLabs, now with puggable drivers to manage different storage mechanisms. |
dchill42 | 0e88408 | 2012-08-11 20:10:17 -0400 | [diff] [blame] | 32 | * By default, the cookie session driver will load, but the 'sess_driver' config/param item (see above) can be |
| 33 | * used to specify the 'native' driver, or any other you might create. |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 34 | * Once loaded, this driver setup is a drop-in replacement for the former CI_Session library, taking its place as the |
| 35 | * 'session' member of the global controller framework (e.g.: $CI->session or $this->session). |
| 36 | * In keeping with the CI_Driver methodology, multiple drivers may be loaded, although this might be a bit confusing. |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 37 | * The CI_Session library class keeps track of the most recently loaded driver as "current" to call for driver methods. |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 38 | * Ideally, one driver is loaded and all calls go directly through the main library interface. However, any methods |
| 39 | * called through the specific driver will switch the "current" driver to itself before invoking the library method |
| 40 | * (which will then call back into the driver for low-level operations). So, alternation between two drivers can be |
| 41 | * achieved by specifying which driver to use for each call (e.g.: $this->session->native->set_userdata('foo', 'bar'); |
| 42 | * $this->session->cookie->userdata('foo'); $this->session->native->unset_userdata('foo');). Notice in the previous |
| 43 | * example that the _native_ userdata value 'foo' would be set to 'bar', which would NOT be returned by the call for |
| 44 | * the _cookie_ userdata 'foo', nor would the _cookie_ value be unset by the call to unset the _native_ 'foo' value. |
| 45 | * |
| 46 | * @package CodeIgniter |
| 47 | * @subpackage Libraries |
| 48 | * @category Sessions |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 49 | * @author EllisLab Dev Team |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 50 | * @link http://codeigniter.com/user_guide/libraries/sessions.html |
| 51 | */ |
Darren Hill | a2ae657 | 2011-09-01 07:36:26 -0400 | [diff] [blame] | 52 | class CI_Session extends CI_Driver_Library { |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 53 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 54 | public $params = array(); |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 55 | protected $current = NULL; |
Darren Hill | a2ae657 | 2011-09-01 07:36:26 -0400 | [diff] [blame] | 56 | protected $userdata = array(); |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 57 | |
| 58 | const FLASHDATA_KEY = 'flash'; |
| 59 | const FLASHDATA_NEW = ':new:'; |
| 60 | const FLASHDATA_OLD = ':old:'; |
| 61 | const FLASHDATA_EXP = ':exp:'; |
| 62 | const EXPIRATION_KEY = '__expirations'; |
| 63 | const TEMP_EXP_DEF = 300; |
| 64 | |
| 65 | /** |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 66 | * CI_Session constructor |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 67 | * |
| 68 | * The constructor loads the configured driver ('sess_driver' in config.php or as a parameter), running |
| 69 | * routines in its constructor, and manages flashdata aging. |
| 70 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 71 | * @param array Configuration parameters |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 72 | */ |
| 73 | public function __construct(array $params = array()) |
| 74 | { |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 75 | log_message('debug', 'CI_Session Class Initialized'); |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 76 | |
| 77 | // Get valid drivers list |
| 78 | $CI =& get_instance(); |
dchill42 | 2642920 | 2012-07-31 10:55:07 -0400 | [diff] [blame] | 79 | $this->valid_drivers = array( |
| 80 | 'Session_native', |
| 81 | 'Session_cookie' |
| 82 | ); |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 83 | $key = 'sess_valid_drivers'; |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 84 | $drivers = isset($params[$key]) ? $params[$key] : $CI->config->item($key); |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 85 | if ($drivers) |
| 86 | { |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 87 | is_array($drivers) OR $drivers = array($drivers); |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 88 | |
| 89 | // Add driver names to valid list |
| 90 | foreach ($drivers as $driver) |
| 91 | { |
dchill42 | 77ee3fd | 2012-07-24 11:50:01 -0400 | [diff] [blame] | 92 | if ( ! in_array(strtolower($driver), array_map('strtolower', $this->valid_drivers))) |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 93 | { |
| 94 | $this->valid_drivers[] = $driver; |
| 95 | } |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | // Get driver to load |
| 100 | $key = 'sess_driver'; |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 101 | $driver = isset($params[$key]) ? $params[$key] : $CI->config->item($key); |
| 102 | if ( ! $driver) |
| 103 | { |
| 104 | $driver = 'cookie'; |
| 105 | } |
| 106 | |
dchill42 | 77ee3fd | 2012-07-24 11:50:01 -0400 | [diff] [blame] | 107 | if ( ! in_array('session_'.strtolower($driver), array_map('strtolower', $this->valid_drivers))) |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 108 | { |
| 109 | $this->valid_drivers[] = 'Session_'.$driver; |
| 110 | } |
| 111 | |
| 112 | // Save a copy of parameters in case drivers need access |
| 113 | $this->params = $params; |
| 114 | |
| 115 | // Load driver and get array reference |
| 116 | $this->load_driver($driver); |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 117 | |
| 118 | // Delete 'old' flashdata (from last request) |
| 119 | $this->_flashdata_sweep(); |
| 120 | |
| 121 | // Mark all new flashdata as old (data will be deleted before next request) |
| 122 | $this->_flashdata_mark(); |
| 123 | |
| 124 | // Delete expired tempdata |
| 125 | $this->_tempdata_sweep(); |
| 126 | |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 127 | log_message('debug', 'CI_Session routines successfully run'); |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 128 | } |
| 129 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 130 | // ------------------------------------------------------------------------ |
| 131 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 132 | /** |
| 133 | * Loads session storage driver |
| 134 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 135 | * @param string Driver classname |
| 136 | * @return object Loaded driver object |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 137 | */ |
| 138 | public function load_driver($driver) |
| 139 | { |
dchill42 | 2642920 | 2012-07-31 10:55:07 -0400 | [diff] [blame] | 140 | // Save reference to most recently loaded driver as library default and sync userdata |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 141 | $this->current = parent::load_driver($driver); |
dchill42 | b185537 | 2012-07-31 09:32:23 -0400 | [diff] [blame] | 142 | $this->userdata =& $this->current->get_userdata(); |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 143 | return $this->current; |
| 144 | } |
| 145 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 146 | // ------------------------------------------------------------------------ |
| 147 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 148 | /** |
| 149 | * Select default session storage driver |
| 150 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 151 | * @param string Driver classname |
| 152 | * @return void |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 153 | */ |
| 154 | public function select_driver($driver) |
| 155 | { |
| 156 | // Validate driver name |
dchill42 | c587225 | 2012-07-30 14:53:11 -0400 | [diff] [blame] | 157 | $lowername = strtolower(str_replace('CI_', '', $driver)); |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 158 | if (in_array($lowername, array_map('strtolower', $this->valid_drivers))) |
| 159 | { |
dchill42 | b185537 | 2012-07-31 09:32:23 -0400 | [diff] [blame] | 160 | // See if driver is loaded |
| 161 | $child = str_replace($this->lib_name.'_', '', $driver); |
| 162 | if (isset($this->$child)) |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 163 | { |
dchill42 | aee9265 | 2012-08-26 21:45:35 -0400 | [diff] [blame] | 164 | // See if driver is already current |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 165 | if ($this->$child !== $this->current) |
| 166 | { |
dchill42 | aee9265 | 2012-08-26 21:45:35 -0400 | [diff] [blame] | 167 | // Make driver current and sync userdata |
| 168 | $this->current = $this->$child; |
| 169 | $this->userdata =& $this->current->get_userdata(); |
| 170 | } |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 171 | } |
| 172 | else |
| 173 | { |
dchill42 | 2642920 | 2012-07-31 10:55:07 -0400 | [diff] [blame] | 174 | // Load new driver |
dchill42 | aee9265 | 2012-08-26 21:45:35 -0400 | [diff] [blame] | 175 | $this->load_driver($child); |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 176 | } |
| 177 | } |
| 178 | } |
| 179 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 180 | // ------------------------------------------------------------------------ |
| 181 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 182 | /** |
| 183 | * Destroy the current session |
| 184 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 185 | * @return void |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 186 | */ |
| 187 | public function sess_destroy() |
| 188 | { |
| 189 | // Just call destroy on driver |
| 190 | $this->current->sess_destroy(); |
| 191 | } |
| 192 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 193 | // ------------------------------------------------------------------------ |
| 194 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 195 | /** |
| 196 | * Regenerate the current session |
| 197 | * |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 198 | * @param bool Destroy session data flag (default: false) |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 199 | * @return void |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 200 | */ |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 201 | public function sess_regenerate($destroy = FALSE) |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 202 | { |
dchill42 | 2642920 | 2012-07-31 10:55:07 -0400 | [diff] [blame] | 203 | // Call regenerate on driver and resync userdata |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 204 | $this->current->sess_regenerate($destroy); |
dchill42 | 2642920 | 2012-07-31 10:55:07 -0400 | [diff] [blame] | 205 | $this->userdata =& $this->current->get_userdata(); |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 206 | } |
| 207 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 208 | // ------------------------------------------------------------------------ |
| 209 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 210 | /** |
| 211 | * Fetch a specific item from the session array |
| 212 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 213 | * @param string Item key |
dchill42 | c587225 | 2012-07-30 14:53:11 -0400 | [diff] [blame] | 214 | * @return string Item value or NULL if not found |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 215 | */ |
| 216 | public function userdata($item) |
| 217 | { |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 218 | return isset($this->userdata[$item]) ? $this->userdata[$item] : NULL; |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 219 | } |
| 220 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 221 | // ------------------------------------------------------------------------ |
| 222 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 223 | /** |
| 224 | * Fetch all session data |
| 225 | * |
| 226 | * @return array User data array |
| 227 | */ |
| 228 | public function all_userdata() |
| 229 | { |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 230 | return isset($this->userdata) ? $this->userdata : NULL; |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 231 | } |
| 232 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 233 | // ------------------------------------------------------------------------ |
| 234 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 235 | /** |
dchill42 | c5079de | 2012-07-23 10:53:47 -0400 | [diff] [blame] | 236 | * Fetch all flashdata |
| 237 | * |
| 238 | * @return array Flash data array |
| 239 | */ |
| 240 | public function all_flashdata() |
| 241 | { |
| 242 | $out = array(); |
| 243 | |
| 244 | // loop through all userdata |
| 245 | foreach ($this->all_userdata() as $key => $val) |
| 246 | { |
dchill42 | c587225 | 2012-07-30 14:53:11 -0400 | [diff] [blame] | 247 | // if it contains flashdata, add it |
dchill42 | c5079de | 2012-07-23 10:53:47 -0400 | [diff] [blame] | 248 | if (strpos($key, self::FLASHDATA_KEY.self::FLASHDATA_OLD) !== FALSE) |
| 249 | { |
dchill42 | 2642920 | 2012-07-31 10:55:07 -0400 | [diff] [blame] | 250 | $key = str_replace(self::FLASHDATA_KEY.self::FLASHDATA_OLD, '', $key); |
dchill42 | c5079de | 2012-07-23 10:53:47 -0400 | [diff] [blame] | 251 | $out[$key] = $val; |
| 252 | } |
| 253 | } |
| 254 | return $out; |
| 255 | } |
| 256 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 257 | // ------------------------------------------------------------------------ |
| 258 | |
dchill42 | c5079de | 2012-07-23 10:53:47 -0400 | [diff] [blame] | 259 | /** |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 260 | * Add or change data in the "userdata" array |
| 261 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 262 | * @param mixed Item name or array of items |
| 263 | * @param string Item value or empty string |
| 264 | * @return void |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 265 | */ |
| 266 | public function set_userdata($newdata = array(), $newval = '') |
| 267 | { |
| 268 | // Wrap params as array if singular |
| 269 | if (is_string($newdata)) |
| 270 | { |
| 271 | $newdata = array($newdata => $newval); |
| 272 | } |
| 273 | |
| 274 | // Set each name/value pair |
| 275 | if (count($newdata) > 0) |
| 276 | { |
| 277 | foreach ($newdata as $key => $val) |
| 278 | { |
| 279 | $this->userdata[$key] = $val; |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | // Tell driver data changed |
| 284 | $this->current->sess_save(); |
| 285 | } |
| 286 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 287 | // ------------------------------------------------------------------------ |
| 288 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 289 | /** |
| 290 | * Delete a session variable from the "userdata" array |
| 291 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 292 | * @param mixed Item name or array of item names |
| 293 | * @return void |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 294 | */ |
| 295 | public function unset_userdata($newdata = array()) |
| 296 | { |
| 297 | // Wrap single name as array |
| 298 | if (is_string($newdata)) |
| 299 | { |
| 300 | $newdata = array($newdata => ''); |
| 301 | } |
| 302 | |
| 303 | // Unset each item name |
| 304 | if (count($newdata) > 0) |
| 305 | { |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 306 | foreach (array_keys($newdata) as $key) |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 307 | { |
| 308 | unset($this->userdata[$key]); |
| 309 | } |
| 310 | } |
| 311 | |
| 312 | // Tell driver data changed |
| 313 | $this->current->sess_save(); |
| 314 | } |
| 315 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 316 | // ------------------------------------------------------------------------ |
| 317 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 318 | /** |
| 319 | * Determine if an item exists |
| 320 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 321 | * @param string Item name |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 322 | * @return bool |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 323 | */ |
| 324 | public function has_userdata($item) |
| 325 | { |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 326 | return isset($this->userdata[$item]); |
| 327 | } |
| 328 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 329 | // ------------------------------------------------------------------------ |
| 330 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 331 | /** |
| 332 | * Add or change flashdata, only available until the next request |
| 333 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 334 | * @param mixed Item name or array of items |
| 335 | * @param string Item value or empty string |
| 336 | * @return void |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 337 | */ |
| 338 | public function set_flashdata($newdata = array(), $newval = '') |
| 339 | { |
| 340 | // Wrap item as array if singular |
| 341 | if (is_string($newdata)) |
| 342 | { |
| 343 | $newdata = array($newdata => $newval); |
| 344 | } |
| 345 | |
| 346 | // Prepend each key name and set value |
| 347 | if (count($newdata) > 0) |
| 348 | { |
| 349 | foreach ($newdata as $key => $val) |
| 350 | { |
| 351 | $flashdata_key = self::FLASHDATA_KEY.self::FLASHDATA_NEW.$key; |
| 352 | $this->set_userdata($flashdata_key, $val); |
| 353 | } |
| 354 | } |
| 355 | } |
| 356 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 357 | // ------------------------------------------------------------------------ |
| 358 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 359 | /** |
| 360 | * Keeps existing flashdata available to next request. |
| 361 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 362 | * @param string Item key |
| 363 | * @return void |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 364 | */ |
| 365 | public function keep_flashdata($key) |
| 366 | { |
dchill42 | c5079de | 2012-07-23 10:53:47 -0400 | [diff] [blame] | 367 | // 'old' flashdata gets removed. Here we mark all flashdata as 'new' to preserve it from _flashdata_sweep() |
| 368 | // Note the function will return NULL if the $key provided cannot be found |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 369 | $old_flashdata_key = self::FLASHDATA_KEY.self::FLASHDATA_OLD.$key; |
| 370 | $value = $this->userdata($old_flashdata_key); |
| 371 | |
| 372 | $new_flashdata_key = self::FLASHDATA_KEY.self::FLASHDATA_NEW.$key; |
| 373 | $this->set_userdata($new_flashdata_key, $value); |
| 374 | } |
| 375 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 376 | // ------------------------------------------------------------------------ |
| 377 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 378 | /** |
| 379 | * Fetch a specific flashdata item from the session array |
| 380 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 381 | * @param string Item key |
| 382 | * @return string |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 383 | */ |
| 384 | public function flashdata($key) |
| 385 | { |
| 386 | // Prepend key and retrieve value |
| 387 | $flashdata_key = self::FLASHDATA_KEY.self::FLASHDATA_OLD.$key; |
| 388 | return $this->userdata($flashdata_key); |
| 389 | } |
| 390 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 391 | // ------------------------------------------------------------------------ |
| 392 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 393 | /** |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 394 | * Add or change tempdata, only available until expiration |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 395 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 396 | * @param mixed Item name or array of items |
| 397 | * @param string Item value or empty string |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 398 | * @param int Item lifetime in seconds or 0 for default |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 399 | * @return void |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 400 | */ |
| 401 | public function set_tempdata($newdata = array(), $newval = '', $expire = 0) |
| 402 | { |
| 403 | // Set expiration time |
| 404 | $expire = time() + ($expire ? $expire : self::TEMP_EXP_DEF); |
| 405 | |
| 406 | // Wrap item as array if singular |
| 407 | if (is_string($newdata)) |
| 408 | { |
| 409 | $newdata = array($newdata => $newval); |
| 410 | } |
| 411 | |
| 412 | // Get or create expiration list |
| 413 | $expirations = $this->userdata(self::EXPIRATION_KEY); |
dchill42 | 77ee3fd | 2012-07-24 11:50:01 -0400 | [diff] [blame] | 414 | if ( ! $expirations) |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 415 | { |
| 416 | $expirations = array(); |
| 417 | } |
| 418 | |
| 419 | // Prepend each key name and set value |
| 420 | if (count($newdata) > 0) |
| 421 | { |
| 422 | foreach ($newdata as $key => $val) |
| 423 | { |
| 424 | $tempdata_key = self::FLASHDATA_KEY.self::FLASHDATA_EXP.$key; |
| 425 | $expirations[$tempdata_key] = $expire; |
| 426 | $this->set_userdata($tempdata_key, $val); |
| 427 | } |
| 428 | } |
| 429 | |
| 430 | // Update expiration list |
| 431 | $this->set_userdata(self::EXPIRATION_KEY, $expirations); |
| 432 | } |
| 433 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 434 | // ------------------------------------------------------------------------ |
| 435 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 436 | /** |
| 437 | * Delete a temporary session variable from the "userdata" array |
| 438 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 439 | * @param mixed Item name or array of item names |
| 440 | * @return void |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 441 | */ |
| 442 | public function unset_tempdata($newdata = array()) |
| 443 | { |
| 444 | // Get expirations list |
| 445 | $expirations = $this->userdata(self::EXPIRATION_KEY); |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 446 | if (empty($expirations)) |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 447 | { |
| 448 | // Nothing to do |
| 449 | return; |
| 450 | } |
| 451 | |
| 452 | // Wrap single name as array |
| 453 | if (is_string($newdata)) |
| 454 | { |
| 455 | $newdata = array($newdata => ''); |
| 456 | } |
| 457 | |
| 458 | // Prepend each item name and unset |
| 459 | if (count($newdata) > 0) |
| 460 | { |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 461 | foreach (array_keys($newdata) as $key) |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 462 | { |
| 463 | $tempdata_key = self::FLASHDATA_KEY.self::FLASHDATA_EXP.$key; |
| 464 | unset($expirations[$tempdata_key]); |
| 465 | $this->unset_userdata($tempdata_key); |
| 466 | } |
| 467 | } |
| 468 | |
| 469 | // Update expiration list |
| 470 | $this->set_userdata(self::EXPIRATION_KEY, $expirations); |
| 471 | } |
| 472 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 473 | // ------------------------------------------------------------------------ |
| 474 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 475 | /** |
| 476 | * Fetch a specific tempdata item from the session array |
| 477 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 478 | * @param string Item key |
| 479 | * @return string |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 480 | */ |
| 481 | public function tempdata($key) |
| 482 | { |
| 483 | // Prepend key and return value |
| 484 | $tempdata_key = self::FLASHDATA_KEY.self::FLASHDATA_EXP.$key; |
| 485 | return $this->userdata($tempdata_key); |
| 486 | } |
| 487 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 488 | // ------------------------------------------------------------------------ |
| 489 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 490 | /** |
| 491 | * Identifies flashdata as 'old' for removal |
| 492 | * when _flashdata_sweep() runs. |
| 493 | * |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 494 | * @return void |
| 495 | */ |
Darren Hill | a2ae657 | 2011-09-01 07:36:26 -0400 | [diff] [blame] | 496 | protected function _flashdata_mark() |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 497 | { |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 498 | foreach ($this->all_userdata() as $name => $value) |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 499 | { |
| 500 | $parts = explode(self::FLASHDATA_NEW, $name); |
| 501 | if (is_array($parts) && count($parts) === 2) |
| 502 | { |
| 503 | $new_name = self::FLASHDATA_KEY.self::FLASHDATA_OLD.$parts[1]; |
| 504 | $this->set_userdata($new_name, $value); |
| 505 | $this->unset_userdata($name); |
| 506 | } |
| 507 | } |
| 508 | } |
| 509 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 510 | // ------------------------------------------------------------------------ |
| 511 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 512 | /** |
| 513 | * Removes all flashdata marked as 'old' |
| 514 | * |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 515 | * @return void |
| 516 | */ |
Darren Hill | a2ae657 | 2011-09-01 07:36:26 -0400 | [diff] [blame] | 517 | protected function _flashdata_sweep() |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 518 | { |
| 519 | $userdata = $this->all_userdata(); |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 520 | foreach (array_keys($userdata) as $key) |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 521 | { |
| 522 | if (strpos($key, self::FLASHDATA_OLD)) |
| 523 | { |
| 524 | $this->unset_userdata($key); |
| 525 | } |
| 526 | } |
| 527 | } |
| 528 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 529 | // ------------------------------------------------------------------------ |
| 530 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 531 | /** |
| 532 | * Removes all expired tempdata |
| 533 | * |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 534 | * @return void |
| 535 | */ |
Darren Hill | a2ae657 | 2011-09-01 07:36:26 -0400 | [diff] [blame] | 536 | protected function _tempdata_sweep() |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 537 | { |
| 538 | // Get expirations list |
| 539 | $expirations = $this->userdata(self::EXPIRATION_KEY); |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 540 | if (empty($expirations)) |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 541 | { |
| 542 | // Nothing to do |
| 543 | return; |
| 544 | } |
| 545 | |
| 546 | // Unset expired elements |
| 547 | $now = time(); |
| 548 | $userdata = $this->all_userdata(); |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 549 | foreach (array_keys($userdata) as $key) |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 550 | { |
| 551 | if (strpos($key, self::FLASHDATA_EXP) && $expirations[$key] < $now) |
| 552 | { |
| 553 | unset($expirations[$key]); |
| 554 | $this->unset_userdata($key); |
| 555 | } |
| 556 | } |
| 557 | |
| 558 | // Update expiration list |
| 559 | $this->set_userdata(self::EXPIRATION_KEY, $expirations); |
| 560 | } |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 561 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 562 | } |
| 563 | |
| 564 | // ------------------------------------------------------------------------ |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 565 | |
| 566 | /** |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 567 | * CI_Session_driver Class |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 568 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 569 | * Extend this class to make a new CI_Session driver. |
| 570 | * A CI_Session driver basically manages an array of name/value pairs with some sort of storage mechanism. |
| 571 | * To make a new driver, derive from (extend) CI_Session_driver. Overload the initialize method and read or create |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 572 | * session data. Then implement a save handler to write changed data to storage (sess_save), a destroy handler |
| 573 | * to remove deleted data (sess_destroy), and an access handler to expose the data (get_userdata). |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 574 | * Put your driver in the libraries/Session/drivers folder anywhere in the loader paths. This includes the |
| 575 | * application directory, the system directory, or any path you add with $CI->load->add_package_path(). |
| 576 | * Your driver must be named CI_Session_<name>, and your filename must be Session_<name>.php, |
| 577 | * preferably also capitalized. (e.g.: CI_Session_foo in libraries/Session/drivers/Session_foo.php) |
| 578 | * Then specify the driver by setting 'sess_driver' in your config file or as a parameter when loading the CI_Session |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 579 | * object. (e.g.: $config['sess_driver'] = 'foo'; OR $CI->load->driver('session', array('sess_driver' => 'foo')); ) |
| 580 | * Already provided are the Native driver, which manages the native PHP $_SESSION array, and |
| 581 | * the Cookie driver, which manages the data in a browser cookie, with optional extra storage in a database table. |
| 582 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 583 | * @package CodeIgniter |
| 584 | * @subpackage Libraries |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 585 | * @category Sessions |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 586 | * @author EllisLab Dev Team |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 587 | */ |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 588 | abstract class CI_Session_driver extends CI_Driver { |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 589 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 590 | /** |
| 591 | * Decorate |
| 592 | * |
| 593 | * Decorates the child with the parent driver lib's methods and properties |
| 594 | * |
| 595 | * @param object Parent library object |
| 596 | * @return void |
| 597 | */ |
| 598 | public function decorate($parent) |
| 599 | { |
| 600 | // Call base class decorate first |
| 601 | parent::decorate($parent); |
| 602 | |
dchill42 | c587225 | 2012-07-30 14:53:11 -0400 | [diff] [blame] | 603 | // Call initialize method now that driver has access to $this->_parent |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 604 | $this->initialize(); |
| 605 | } |
| 606 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 607 | // ------------------------------------------------------------------------ |
| 608 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 609 | /** |
| 610 | * __call magic method |
| 611 | * |
| 612 | * Handles access to the parent driver library's methods |
| 613 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 614 | * @param string Library method name |
| 615 | * @param array Method arguments (default: none) |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 616 | * @return mixed |
| 617 | */ |
| 618 | public function __call($method, $args = array()) |
| 619 | { |
| 620 | // Make sure the parent library uses this driver |
dchill42 | c587225 | 2012-07-30 14:53:11 -0400 | [diff] [blame] | 621 | $this->_parent->select_driver(get_class($this)); |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 622 | return parent::__call($method, $args); |
| 623 | } |
| 624 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 625 | // ------------------------------------------------------------------------ |
| 626 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 627 | /** |
| 628 | * Initialize driver |
| 629 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 630 | * @return void |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 631 | */ |
| 632 | protected function initialize() |
| 633 | { |
| 634 | // Overload this method to implement initialization |
| 635 | } |
| 636 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 637 | // ------------------------------------------------------------------------ |
| 638 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 639 | /** |
| 640 | * Save the session data |
| 641 | * |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 642 | * Data in the array has changed - perform any storage synchronization |
| 643 | * necessary. The child class MUST implement this abstract method! |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 644 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 645 | * @return void |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 646 | */ |
| 647 | abstract public function sess_save(); |
| 648 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 649 | // ------------------------------------------------------------------------ |
| 650 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 651 | /** |
| 652 | * Destroy the current session |
| 653 | * |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 654 | * Clean up storage for this session - it has been terminated. |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 655 | * The child class MUST implement this abstract method! |
| 656 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 657 | * @return void |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 658 | */ |
| 659 | abstract public function sess_destroy(); |
| 660 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 661 | // ------------------------------------------------------------------------ |
| 662 | |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 663 | /** |
| 664 | * Regenerate the current session |
| 665 | * |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 666 | * Regenerate the session ID. |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 667 | * The child class MUST implement this abstract method! |
| 668 | * |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 669 | * @param bool Destroy session data flag (default: false) |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 670 | * @return void |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 671 | */ |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 672 | abstract public function sess_regenerate($destroy = FALSE); |
| 673 | |
| 674 | // ------------------------------------------------------------------------ |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 675 | |
| 676 | /** |
| 677 | * Get a reference to user data array |
| 678 | * |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 679 | * Give array access to the main CI_Session object. |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 680 | * The child class MUST implement this abstract method! |
| 681 | * |
Darren Hill | 5073a37 | 2011-08-31 13:54:19 -0400 | [diff] [blame] | 682 | * @return array Reference to userdata |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 683 | */ |
| 684 | abstract public function &get_userdata(); |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 685 | |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 686 | } |
Darren Hill | c4e266b | 2011-08-30 15:40:27 -0400 | [diff] [blame] | 687 | |
| 688 | /* End of file Session.php */ |
Andrey Andreev | 9ffcee6 | 2012-09-05 16:25:16 +0300 | [diff] [blame] | 689 | /* Location: ./system/libraries/Session/Session.php */ |