diff options
author | Jonathon Hill <jhill@brandmovers.com> | 2012-11-12 14:51:41 +0100 |
---|---|---|
committer | Jonathon Hill <jhill@brandmovers.com> | 2012-11-12 14:51:41 +0100 |
commit | 3978fc33d82dd7f778d1adbf30744f4dfac41c25 (patch) | |
tree | f32be1ae610f0cfeff65c35abecd14e8ea5cadc6 /system/libraries/Session/Session.php | |
parent | 275cf274860c6ed181d50b398efd3a21d7ba9135 (diff) | |
parent | a9ab46d7a031bda304eb9b6658ffaf693b8d9bcb (diff) |
Merge remote-tracking branch 'upstream/develop' into develop
Conflicts:
user_guide_src/source/changelog.rst
Signed-off-by: Jonathon Hill <jhill@brandmovers.com>
Diffstat (limited to 'system/libraries/Session/Session.php')
-rwxr-xr-x | system/libraries/Session/Session.php | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index fec9b5b31..96e65f154 100755 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -1,4 +1,4 @@ -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); +<?php /** * CodeIgniter * @@ -18,12 +18,13 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2006 - 2012 EllisLab, Inc. + * @copyright Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/) * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * @link http://codeigniter.com * @since Version 2.0 * @filesource */ +defined('BASEPATH') OR exit('No direct script access allowed'); /** * CodeIgniter Session Class @@ -51,10 +52,29 @@ */ class CI_Session extends CI_Driver_Library { + /** + * Initialization parameters + * + * @var array + */ public $params = array(); + + /** + * Current driver in use + * + * @var string + */ protected $current = NULL; + + /** + * User data + * + * @var array + */ protected $userdata = array(); + // ------------------------------------------------------------------------ + const FLASHDATA_KEY = 'flash'; const FLASHDATA_NEW = ':new:'; const FLASHDATA_OLD = ':old:'; @@ -62,6 +82,8 @@ class CI_Session extends CI_Driver_Library { const EXPIRATION_KEY = '__expirations'; const TEMP_EXP_DEF = 300; + // ------------------------------------------------------------------------ + /** * CI_Session constructor * @@ -506,7 +528,7 @@ class CI_Session extends CI_Driver_Library { foreach ($this->all_userdata() as $name => $value) { $parts = explode(self::FLASHDATA_NEW, $name); - if (is_array($parts) && count($parts) === 2) + if (count($parts) === 2) { $new_name = self::FLASHDATA_KEY.self::FLASHDATA_OLD.$parts[1]; $this->set_userdata($new_name, $value); @@ -595,8 +617,16 @@ class CI_Session extends CI_Driver_Library { */ abstract class CI_Session_driver extends CI_Driver { + /** + * CI Singleton + * + * @see get_instance() + * @var object + */ protected $CI; + // ------------------------------------------------------------------------ + /** * Constructor * |