Definition at line 13 of file oxsession.php.
Public Member Functions | |
getId () | |
setId ($sVal) | |
setName ($sVal) | |
getName () | |
start () | |
initNewSession () | |
freeze () | |
destroy () | |
url ($url) | |
sid () | |
hiddenSid () | |
getBasket () | |
setBasket ($oBasket) | |
delBasket () | |
isNewSession () | |
isSidNeeded () | |
processUrl ($sUrl) | |
Static Public Member Functions | |
static | getInstance () |
static | hasVar ($name) |
static | setVar ($name, $value) |
static | getVar ($name) |
static | deleteVar ($name) |
Protected Member Functions | |
_sessionStart () | |
_forceSessionStart () | |
_allowSessionStart () | |
_isSwappedClient () | |
_checkUserAgent ($sAgent, $sExistingAgent) | |
_checkSid () | |
_checkCookies ($sCookieSid, $aSessCookieSetOnce) | |
_setSessionId ($sSessId) | |
_getBasketName () | |
_getCookieSid () | |
_isSessionRequiredAction () | |
Protected Attributes | |
$_sName = 'sid' | |
$_sId = null | |
$_blNewSession = false | |
$_sErrorMsg = null | |
$_oBasket = null | |
$_aRequireCookiesInFncs | |
$_blSidNeeded = null | |
$_aPersistentParams = array("actshop", "lang", "currency", "language", "tpllanguage") | |
Static Protected Attributes | |
static | $_blIsNewSession = false |
static | $_instance = null |
static | $_oUser = null |
static oxSession.getInstance | ( | ) | [static] |
get oxSession object instance (create if needed)
Reimplemented in oxOpenIdSession.
Definition at line 99 of file oxsession.php.
oxSession.getId | ( | ) |
oxSession.setId | ( | $ | sVal | ) |
Sets session id
string | $sVal id value |
Definition at line 129 of file oxsession.php.
oxSession.setName | ( | $ | sVal | ) |
Sets session param name
string | $sVal name value |
Definition at line 141 of file oxsession.php.
oxSession.getName | ( | ) |
oxSession.start | ( | ) |
Starts shop session, generates unique session ID, extracts user IP.
oxSystemComponentException |
Definition at line 163 of file oxsession.php.
oxSession._sessionStart | ( | ) | [protected] |
Initialize session data (calls php.session_start())
Definition at line 217 of file oxsession.php.
oxSession.initNewSession | ( | ) |
Assigns new session ID, clean existing data except persistent.
Definition at line 227 of file oxsession.php.
oxSession.freeze | ( | ) |
Ends the current session and store session data.
Definition at line 253 of file oxsession.php.
oxSession.destroy | ( | ) |
Destroys all data registered to a session.
Definition at line 266 of file oxsession.php.
static oxSession.hasVar | ( | $ | name | ) | [static] |
Checks if variable is set in session. Returns true on success.
string | $name Name to check |
Definition at line 280 of file oxsession.php.
static oxSession.setVar | ( | $ | name, | |
$ | value | |||
) | [static] |
Sets parameter and its value to global session mixedvar array.
string | $name Name of parameter to store | |
mixed | $value Value of parameter |
Definition at line 304 of file oxsession.php.
static oxSession.getVar | ( | $ | name | ) | [static] |
IF available returns value of parameter, stored in session array.
string | $name Name of parameter |
Definition at line 327 of file oxsession.php.
static oxSession.deleteVar | ( | $ | name | ) | [static] |
Destroys a single element (passed to method) of an session array.
string | $name Name of parameter to destroy |
Definition at line 353 of file oxsession.php.
oxSession.url | ( | $ | url | ) |
Append URL with session information parameter.
string | $url Current url |
Definition at line 377 of file oxsession.php.
oxSession.sid | ( | ) |
Returns string prefix to URL with session ID parameter. In some cases (if client is robot, such as Google) adds parameter shp, to identify, witch shop is currently running.
Definition at line 428 of file oxsession.php.
oxSession.hiddenSid | ( | ) |
Forms input ("hidden" type) to pass session ID after submitting forms.
Definition at line 460 of file oxsession.php.
oxSession.getBasket | ( | ) |
oxSession.setBasket | ( | $ | oBasket | ) |
Sets basket session object.
object | $oBasket basket object |
Definition at line 495 of file oxsession.php.
oxSession.delBasket | ( | ) |
oxSession.isNewSession | ( | ) |
Indicates if setting of session id is executed in this script.
Definition at line 517 of file oxsession.php.
oxSession._forceSessionStart | ( | ) | [protected] |
Returns true if its not search engine and config option blForceSessionStart = 1/true
Definition at line 527 of file oxsession.php.
oxSession._allowSessionStart | ( | ) | [protected] |
Checks if we can start new session. Returns bool success status
Definition at line 537 of file oxsession.php.
oxSession._isSwappedClient | ( | ) | [protected] |
Saves various visitor parameters and compares with current data. Returns true if any change is detected. Using this method we can detect different visitor with same session id.
Definition at line 568 of file oxsession.php.
oxSession._checkUserAgent | ( | $ | sAgent, | |
$ | sExistingAgent | |||
) | [protected] |
Checking user agent
string | $sAgent current user agent | |
string | $sExistingAgent existing user agent |
Definition at line 627 of file oxsession.php.
oxSession._checkSid | ( | ) | [protected] |
Checking by timeout ( 60 minutes inactive, then kick him ) Global session Timeout in oxconfig.StartupDatabase is set to 1 hour
bool
Definition at line 676 of file oxsession.php.
oxSession._checkCookies | ( | $ | sCookieSid, | |
$ | aSessCookieSetOnce | |||
) | [protected] |
Check for existing cookie. Cookie info is dropped from time to time.
string | $sCookieSid coockie sid | |
array | $aSessCookieSetOnce if session cookie is set |
Definition at line 700 of file oxsession.php.
oxSession._setSessionId | ( | $ | sSessId | ) | [protected] |
Sests session id to $sSessId
string | $sSessId sesion ID |
Definition at line 742 of file oxsession.php.
oxSession._getBasketName | ( | ) | [protected] |
oxSession._getCookieSid | ( | ) | [protected] |
oxSession._isSessionRequiredAction | ( | ) | [protected] |
oxSession.isSidNeeded | ( | ) |
Checks if cookies are not available. Returns TRUE of sid needed
Definition at line 812 of file oxsession.php.
oxSession.processUrl | ( | $ | sUrl | ) |
Appends url with session ID, but only if oxSession._isSidNeeded() returns true
string | $sUrl url to append with sid |
Definition at line 849 of file oxsession.php.
oxSession.$_sName = 'sid' [protected] |
Definition at line 20 of file oxsession.php.
oxSession.$_sId = null [protected] |
Definition at line 26 of file oxsession.php.
oxSession.$_blIsNewSession = false [static, protected] |
Definition at line 33 of file oxsession.php.
oxSession.$_instance = null [static, protected] |
Singleton instance keeper.
Reimplemented in oxOpenIdSession.
Definition at line 38 of file oxsession.php.
oxSession.$_oUser = null [static, protected] |
Definition at line 44 of file oxsession.php.
oxSession.$_blNewSession = false [protected] |
Definition at line 52 of file oxsession.php.
oxSession.$_sErrorMsg = null [protected] |
Definition at line 59 of file oxsession.php.
oxSession.$_oBasket = null [protected] |
Definition at line 66 of file oxsession.php.
oxSession.$_aRequireCookiesInFncs [protected] |
Initial value:
array( 'register' => null, 'account' => null, 'tobasket', 'login_noredirect', 'tocomparelist' )
Definition at line 73 of file oxsession.php.
oxSession.$_blSidNeeded = null [protected] |
Definition at line 85 of file oxsession.php.
oxSession.$_aPersistentParams = array("actshop", "lang", "currency", "language", "tpllanguage") [protected] |
Definition at line 92 of file oxsession.php.