Inherited Variables
Inherited Constants
Inherited Methods
Class: VObject
- VObject::__construct()
- Class Constructor
- VObject::bind()
- Bind values to this object
- VObject::delete()
- Delete Object
- VObject::get()
- Get value
- VObject::getAll()
- Get all object values
- VObject::getError()
- Get error message
- VObject::getErrors()
- Get errors
- VObject::getMethods()
- Get object methods
- VObject::getProperties()
- Get object properties
- VObject::save()
- Save Object
- VObject::set()
- Set a value
- VObject::setError()
- Set error value
- VObject::setProperties()
- Set property values
- VObject::setProperty()
- Set property value
- VObject::toString()
- Convert object to string
- VObject::__destruct()
- Class Destructor
- VObject::__toString()
- Return object as a string
Class Details
Virtual Web Platform - Session Manager
This file provides the primary session manager interface
Tags:
- author - Ralph Ritoch <rritoch@gmail.com>
- copyright - (c) Ralph Ritoch - All Rights Reserved
- link - VNetPublishing.Com
- license - VNETLPL Limited Public License
[ Top ]
Class Variables
$_expire = 3600
[line 98]
Session timeout
Tags:
- var - Session expire timeout
- access - public
Type: integer
Overrides:
[ Top ]
$_force_ssl = false
[line 61]
Force SSL Mode
Tags:
- var - Force SSL Cookies
- access - protected
Type: boolean
Overrides:
[ Top ]
$_security = "A"
[line 110]
Security flags
A = Address B = Browser
Tags:
- var - Security settings
- access - public
Type: string
Overrides:
[ Top ]
$_state = 'active'
[line 70]
Session state
Tags:
- var - Session state
- access - protected
Type: string
Overrides:
[ Top ]
Class Methods
static getInstance
static VSession &getInstance(
)
[line 146]
Get current session
Tags:
- return - Current session
- access - public
Parameters:
[ Top ]
__construct
VSession __construct(
)
[line 611]
Class constructor
Tags:
- access - public
Overrides VObject::__construct() (Class Constructor)
Parameters:
[ Top ]
deleteVar
mixed deleteVar(
string
$name, [string
$namespace = 'default'])
[line 193]
Delete a variable from the session
Tags:
- return - Value from session or warning if not set
- access - public
Parameters:
- string $name - Name of variable
- string $namespace - Namespace to use, default to 'default'
[ Top ]
exists
boolean exists(
string
$name, [string
$namespace = 'default'])
[line 218]
Check if data exists in the session
Tags:
- return - true if the variable exists
- access - public
Parameters:
- string $name - Name of variable
- string $namespace - Namespace to use, default to 'default'
[ Top ]
get
mixed &get(
string
$name, [mixed
$default = null], [string
$namespace = 'default'])
[line 245]
Get data value from the session
Tags:
- return - Value of requested session variable
- access - public
Overrides VObject::get() (Get value)
Parameters:
- string $name - Name of a variable
- mixed $default - Default value of a variable if not set
- string $namespace - Namespace to use, default to 'default'
[ Top ]
isLive
boolean isLive(
)
[line 161]
Is Session Live
Tags:
- return - True if there are any session handlers
- access - public
Parameters:
[ Top ]
register
void register(
)
[line 171]
Register the functions of this class with PHP's session handler
Tags:
- access - public
Parameters:
[ Top ]
reset
void reset(
)
[line 586]
Reset session
Deletes all session data and creates a new session
Tags:
- access - public
Parameters:
[ Top ]
set
mixed set(
string
$name, [mixed
$value = null], [string
$namespace = 'default'])
[line 269]
Set data value into the session
Tags:
- return - Old data value
- access - public
Overrides VObject::set() (Set a value)
Parameters:
- string $name - Name of a variable
- mixed $value - Value of a variable
- string $namespace - Namespace to use, default to 'default'
[ Top ]
setTimers
boolean setTimers(
)
[line 294]
Set the session timers
Tags:
- return - true on success
- access - public
Parameters:
[ Top ]
_close
boolean _close(
)
[line 338]
Close the session.
Tags:
- return - True on success, false otherwise.
- access - public
Parameters:
[ Top ]
_createId
string _createId(
)
[line 468]
Create a session id
Tags:
- return - Session ID
- access - public
Parameters:
[ Top ]
_destroy
boolean _destroy(
string
$id)
[line 406]
Destroy the data for a particular session identifier
Tags:
- return - True on success, false otherwise.
- access - public
Parameters:
- string $id - The session identifier.
[ Top ]
_gc
boolean _gc(
integer
$maxlifetime)
[line 421]
Garbage collect stale sessions
Tags:
- return - True on success, false otherwise.
- access - public
Parameters:
- integer $maxlifetime - The maximum age of a session.
[ Top ]
_open
boolean _open(
string
$save_path, string
$session_name)
[line 317]
Open the Session
Tags:
- return - True on success, false otherwise.
- access - public
Parameters:
- string $save_path - The path to the session object.
- string $session_name - The name of the session.
[ Top ]
_read
string _read(
string
$id)
[line 354]
Read the data for a particular session identifier from the SessionHandler backend.
Tags:
- return - The session data.
- access - public
Parameters:
- string $id - The session identifier.
[ Top ]
_setHits
boolean _setHits(
)
[line 450]
Set session hits
Tags:
- return - True on success
- access - public
Parameters:
[ Top ]
_start
boolean _start(
)
[line 487]
Start a session
Creates a session (or resumes the current one based on the state of the session)
Tags:
- return - true on success
- access - public
Parameters:
[ Top ]
_validate
boolean|object True _validate(
[boolean
$restart = false])
[line 520]
Do some checks for security reason
- timeout check (expire)
- ip-fixiation
- browser-fixiation
Tags:
- return - on success, warning or error on failure
- access - public
Parameters:
- boolean $restart - reactivate session
[ Top ]
_write
boolean _write(
string
$id, string
$data)
[line 391]
Write session data
Tags:
- return - True on success, false otherwise
- access - public
Parameters:
- string $id - The session identifier.
- string $data - Session data
[ Top ]