OXID eShop CE
6.1.5
|
Public Member Functions | |
setOxCookie ($sName, $sValue="", $iExpire=0, $sPath='/', $sDomain=null, $blToSession=true, $blSecure=false, $blHttpOnly=true) | |
loadSessionCookies () | |
getOxCookie ($sName=null) | |
getRemoteAddress () | |
getServerVar ($sServVar=null) | |
setUserCookie ($sUser, $sPassword, $sShopId=null, $iTimeout=31536000, $sSalt='ox') | |
deleteUserCookie ($sShopId=null) | |
getUserCookie ($sShopId=null) | |
isTrustedClientIp () | |
processUserAgentInfo ($sAgent) | |
isCurrentUrl ($sURL) | |
_isCurrentUrl ($sURL, $sServerHost) | |
getServerNodeId () | |
getServerIp () | |
Protected Member Functions | |
_mustSaveToSession () | |
_getSessionCookieKey ($blGet) | |
_saveSessionCookie ($sName, $sValue, $iExpire, $sPath, $sDomain) | |
_getCookiePath ($sPath) | |
_getCookieDomain ($sDomain) | |
Protected Attributes | |
$_aUserCookie = [] | |
$_sSessionCookiesName = 'aSessionCookies' | |
$_sSessionCookies = [] | |
$_blSaveToSession = null | |
Private Member Functions | |
getServerName () | |
Server data manipulation class
|
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. |
|
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 |
|
protected |
Returns session cookie key
bool | $blGet | mode - true - get, false - set cookie |
OxidEsales\EshopCommunity\Core\UtilsServer::_isCurrentUrl | ( | $sURL, | |
$sServerHost | |||
) |
Check if the given URL is same as used for request. The URL in this context is the base address for the shop e.g. https://www.domain.com/shop/ the protocol is optional (www.domain.com/shop/) but the protocol relative syntax (//www.domain.com/shop/) is not yet supported.
string | $sURL | URL to check if is same as request. |
string | $sServerHost | request host. |
|
protected |
Checks if cookie must be saved to session in order to transfer it to different domain
|
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 |
OxidEsales\EshopCommunity\Core\UtilsServer::deleteUserCookie | ( | $sShopId = null | ) |
Deletes user cookie data
string | $sShopId | shop ID (default null) |
OxidEsales\EshopCommunity\Core\UtilsServer::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 |
OxidEsales\EshopCommunity\Core\UtilsServer::getRemoteAddress | ( | ) |
Returns remote IP address
OxidEsales\EshopCommunity\Core\UtilsServer::getServerIp | ( | ) |
Return local machine ip.
|
private |
Return server system parameter similar as unix uname.
OxidEsales\EshopCommunity\Core\UtilsServer::getServerNodeId | ( | ) |
Return server id by server system information.
OxidEsales\EshopCommunity\Core\UtilsServer::getServerVar | ( | $sServVar = null | ) |
returns a server constant
string | $sServVar | optional - which server var should be returned, if null returns whole $_SERVER |
OxidEsales\EshopCommunity\Core\UtilsServer::getUserCookie | ( | $sShopId = null | ) |
Returns cookie stored used login data
string | $sShopId | shop ID (default null) |
OxidEsales\EshopCommunity\Core\UtilsServer::isCurrentUrl | ( | $sURL | ) |
Compares current URL to supplied string
string | $sURL | URL |
OxidEsales\EshopCommunity\Core\UtilsServer::isTrustedClientIp | ( | ) |
Checks if current client ip is in trusted IPs list. IP list is defined in config file as "aTrustedIPs" parameter
OxidEsales\EshopCommunity\Core\UtilsServer::loadSessionCookies | ( | ) |
Stored all session cookie info to cookies
OxidEsales\EshopCommunity\Core\UtilsServer::processUserAgentInfo | ( | $sAgent | ) |
Removes MSIE(\s)?(\S)*(\s) from browser agent information
string | $sAgent | browser user agent idenfitier |
OxidEsales\EshopCommunity\Core\UtilsServer::setOxCookie | ( | $sName, | |
$sValue = "" , |
|||
$iExpire = 0 , |
|||
$sPath = '/' , |
|||
$sDomain = null , |
|||
$blToSession = true , |
|||
$blSecure = false , |
|||
$blHttpOnly = 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 |
bool | $blSecure | if true, transfer cookie only via SSL |
bool | $blHttpOnly | if true, only accessible via HTTP |
OxidEsales\EshopCommunity\Core\UtilsServer::setUserCookie | ( | $sUser, | |
$sPassword, | |||
$sShopId = null , |
|||
$iTimeout = 31536000 , |
|||
$sSalt = 'ox' |
|||
) |
Sets user info into cookie
string | $sUser | user ID |
string | $sPassword | password |
string | $sShopId | shop ID (default null) |
integer | $iTimeout | timeout value (default 31536000) |
string | $sSalt | Salt for password encryption |
|
protected |
|
protected |
|
protected |
|
protected |