|
static | write ($key, $value) |
|
static | w ($key, $value) |
|
static | read ($key, $default=false, $child=false) |
|
static | r ($key, $default=false, $child=false) |
|
static | delete ($key) |
|
static | d ($key) |
|
static | dump () |
|
static | start () |
|
static | params () |
|
static | close () |
|
static | commit () |
|
static | destroy () |
|
|
static | $SESSION_AGE = 1800 |
|
Definition at line 75 of file CSession.php.
Closes the current session and releases session file lock.
- Returns
- boolean Returns true upon success and false upon failure.
Definition at line 274 of file CSession.php.
276 if (
'' !== session_id())
278 return session_write_close();
Deletes a value from the current session data.
- Parameters
-
string | $key | String identifying the array key to delete. |
- Returns
- void
- Exceptions
-
Definition at line 185 of file CSession.php.
187 if (!is_string($key))
189 $sErrorMessage =
'Session key must be string value';
191 throw new InvalidArgumentTypeException($sErrorMessage);
194 unset($_SESSION[$key]);
static get($sChannel="default", $sLogRoot="")
Removes session data and destroys the current session.
- Returns
- void
Definition at line 299 of file CSession.php.
301 if (
'' !== session_id())
307 if (ini_get(
"session.use_cookies"))
309 $params = session_get_cookie_params();
310 setcookie(session_name(),
'', time() - 42000, $params[
"path"], $params[
"domain"], $params[
"secure"], $params[
"httponly"]
Echos current session data.
- Returns
- void
Definition at line 216 of file CSession.php.
219 echo nl2br(print_r($_SESSION));
Returns current session cookie parameters or an empty array.
- Returns
- array Associative array of session cookie parameters.
Definition at line 259 of file CSession.php.
262 if (
'' !== session_id())
264 $r = session_get_cookie_params();
static r |
( |
|
$key, |
|
|
|
$default = false , |
|
|
|
$child = false |
|
) |
| |
|
static |
Alias for Session::read().
- See also
- CSession::read()
- Parameters
-
string | $key | String identifier. |
mixed | $default | Default value |
boolean | $child | Optional child identifier for accessing array elements. |
- Returns
- mixed Returns a string value upon success. Returns false upon failure.
- Exceptions
-
Definition at line 173 of file CSession.php.
175 return self::read($key, $default, $child);
static read |
( |
|
$key, |
|
|
|
$default = false , |
|
|
|
$child = false |
|
) |
| |
|
static |
Reads a specific value from the current session data.
- Parameters
-
string | $key | String identifier. |
mixed | $default | Default value |
boolean | $child | Optional child identifier for accessing array elements. |
- Returns
- mixed Returns a string value upon success. Returns false upon failure.
- Exceptions
-
Definition at line 132 of file CSession.php.
134 if (!is_string($key))
136 $sErrorMessage =
'Session key must be string value';
138 throw new InvalidArgumentTypeException($sErrorMessage);
141 if (isset($_SESSION[$key]))
147 return $_SESSION[$key];
151 if (isset($_SESSION[$key][$child]))
153 return $_SESSION[$key][$child];
static get($sChannel="default", $sLogRoot="")
Starts or resumes a session by calling Session::_init().
- See also
- CSession::_init()
- Returns
- boolean Returns true upon success and false upon failure.
- Exceptions
-
Definition at line 229 of file CSession.php.
232 return self::_init();
static w |
( |
|
$key, |
|
|
|
$value |
|
) |
| |
|
static |
Alias for Session::write().
- See also
- CSession::write()
- Parameters
-
string | $key | String identifier. |
mixed | $value | Single value or array of values to be written. |
- Returns
- mixed Value or array of values written.
- Exceptions
-
Definition at line 118 of file CSession.php.
120 return self::write($key, $value);
static write |
( |
|
$key, |
|
|
|
$value |
|
) |
| |
|
static |
Writes a value to the current session data.
- Parameters
-
string | $key | String identifier. |
mixed | $value | Single value or array of values to be written. |
- Returns
- mixed Value or array of values written.
- Exceptions
-
Definition at line 95 of file CSession.php.
99 $sErrorMessage =
'Session key must be string value';
101 throw new InvalidArgumentTypeException($sErrorMessage);
104 $_SESSION[$key] = $value;
static get($sChannel="default", $sLogRoot="")
The documentation for this class was generated from the following file: