Public Member Functions | |
setOxCookie ($sName, $sValue="", $iExpire=0, $sPath= '/', $sDomain=null, $blToSession=true) | |
loadSessionCookies () | |
getOxCookie ($sName=null) | |
getRemoteAddress () | |
getServerVar ($sServVar=null) | |
setUserCookie ($sUser, $sPassword, $sShopId=null, $iTimeout=31536000) | |
deleteUserCookie ($sShopId=null) | |
getUserCookie ($sShopId=null) | |
isTrustedClientIp () | |
processUserAgentInfo ($sAgent) | |
Static Public Member Functions | |
static | getInstance () |
Protected Member Functions | |
_mustSaveToSession () | |
_getSessionCookieKey ($blGet) | |
_saveSessionCookie ($sName, $sValue, $iExpire, $sPath, $sDomain) | |
_getCookiePath ($sPath) | |
_getCookieDomain ($sDomain) | |
Protected Attributes | |
$_aUserCookie = array() | |
$_sSessionCookiesName = 'aSessionCookies' | |
$_sSessionCookies = array() | |
$_blSaveToSession = null | |
Static Private Attributes | |
static | $_instance = null |
Server data manipulation class
Definition at line 6 of file oxutilsserver.php.
oxUtilsServer._getCookieDomain | ( | $ | sDomain | ) | [protected] |
Returns domain that cookie available. If user did not set domain, or set it to null, according to php documentation empty string will be returned, marking to skip argument. Additionally domain can be defined in config.inc.php file as "sCookieDomain" param. Please check cookie documentation for more details about current parameter
string | $sDomain the domain that the cookie is available. |
Definition at line 227 of file oxutilsserver.php.
oxUtilsServer._getCookiePath | ( | $ | sPath | ) | [protected] |
Returns cookie path. If user did not set path, or set it to null, according to php documentation empty string will be returned, marking to skip argument. Additionally path can be defined in config.inc.php file as "sCookiePath" param. Please check cookie documentation for more details about current parameter
string | $sPath user defined cookie path |
Definition at line 201 of file oxutilsserver.php.
oxUtilsServer._getSessionCookieKey | ( | $ | blGet | ) | [protected] |
Returns session cookie key
bool | $blGet mode - true - get, false - set cookie |
Definition at line 133 of file oxutilsserver.php.
oxUtilsServer._mustSaveToSession | ( | ) | [protected] |
Checks if cookie must be saved to session in order to transfer it to different domain
Definition at line 103 of file oxutilsserver.php.
oxUtilsServer._saveSessionCookie | ( | $ | sName, | |
$ | sValue, | |||
$ | iExpire, | |||
$ | sPath, | |||
$ | sDomain | |||
) | [protected] |
Copies cookie info to session
string | $sName cookie name | |
string | $sValue cookie value | |
int | $iExpire expiration time | |
string | $sPath cookie path | |
string | $sDomain cookie domain |
Definition at line 156 of file oxutilsserver.php.
oxUtilsServer.deleteUserCookie | ( | $ | sShopId = null |
) |
Deletes user cookie data
string | $sShopId shop ID (default null) |
Definition at line 329 of file oxutilsserver.php.
static oxUtilsServer.getInstance | ( | ) | [static] |
Returns server utils instance
Definition at line 41 of file oxutilsserver.php.
oxUtilsServer.getOxCookie | ( | $ | sName = null |
) |
Returns cookie $sName value. If optional parameter $sName is not set then getCookie() returns whole cookie array
string | $sName cookie param name |
Definition at line 254 of file oxutilsserver.php.
oxUtilsServer.getRemoteAddress | ( | ) |
oxUtilsServer.getServerVar | ( | $ | sServVar = null |
) |
returns a server constant
string | $sServVar optional - which server var should be returned, if null returns whole $_SERVER |
Definition at line 292 of file oxutilsserver.php.
oxUtilsServer.getUserCookie | ( | $ | sShopId = null |
) |
Returns cookie stored used login data
string | $sShopId shop ID (default null) |
Definition at line 343 of file oxutilsserver.php.
oxUtilsServer.isTrustedClientIp | ( | ) |
Checks if current client ip is in trusted IPs list. IP list is defined in config file as "aTrustedIPs" parameter
Definition at line 359 of file oxutilsserver.php.
oxUtilsServer.loadSessionCookies | ( | ) |
Stored all session cookie info to cookies
Definition at line 173 of file oxutilsserver.php.
oxUtilsServer.processUserAgentInfo | ( | $ | sAgent | ) |
Removes MSIE()?()*() from browser agent information
string | $sAgent browser user agent idenfitier |
Definition at line 377 of file oxutilsserver.php.
oxUtilsServer.setOxCookie | ( | $ | sName, | |
$ | sValue = "" , |
|||
$ | iExpire = 0 , |
|||
$ | sPath = '/' , |
|||
$ | sDomain = null , |
|||
$ | blToSession = true | |||
) |
sets cookie
string | $sName cookie name | |
string | $sValue value | |
int | $iExpire expire time | |
string | $sPath The path on the server in which the cookie will be available on | |
string | $sDomain The domain that the cookie is available. | |
bool | $blToSession is true, records cookie information to session |
Definition at line 69 of file oxutilsserver.php.
oxUtilsServer.setUserCookie | ( | $ | sUser, | |
$ | sPassword, | |||
$ | sShopId = null , |
|||
$ | iTimeout = 31536000 | |||
) |
Sets user info into cookie
string | $sUser user ID | |
string | $sPassword password | |
string | $sShopId shop ID (default null) | |
integer | $iTimeout timeout value (default 31536000) |
Definition at line 315 of file oxutilsserver.php.
oxUtilsServer.$_aUserCookie = array() [protected] |
Definition at line 20 of file oxutilsserver.php.
oxUtilsServer.$_blSaveToSession = null [protected] |
Definition at line 96 of file oxutilsserver.php.
oxUtilsServer.$_instance = null [static, private] |
Definition at line 13 of file oxutilsserver.php.
oxUtilsServer.$_sSessionCookies = array() [protected] |
Definition at line 34 of file oxutilsserver.php.
oxUtilsServer.$_sSessionCookiesName = 'aSessionCookies' [protected] |
Definition at line 27 of file oxutilsserver.php.