Public Member Functions |
| setOxCookie ($sName, $sValue="", $iExpire=0, $sPath= '/', $sDomain=null, $blToSession=true, $blSecure=false) |
| 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 () |
| __call ($sMethod, $aArgs) |
| __construct () |
| getConfig () |
| setConfig ($oConfig) |
| getSession () |
| setSession ($oSession) |
| getUser () |
| setUser ($oUser) |
| isAdmin () |
| setAdminMode ($blAdmin) |
Detailed Description
Server data manipulation class
Definition at line 6 of file oxutilsserver.php.
Member Function Documentation
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
- Parameters
-
string | $sDomain | the domain that the cookie is available. |
- Returns
- string
Definition at line 193 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
- Parameters
-
string | $sPath | user defined cookie path |
- Returns
- string
Definition at line 171 of file oxutilsserver.php.
oxUtilsServer::_getSessionCookieKey |
( |
|
$blGet | ) |
|
|
protected |
Returns session cookie key
- Parameters
-
bool | $blGet | mode - true - get, false - set cookie |
- Returns
- string
Definition at line 107 of file oxutilsserver.php.
oxUtilsServer::_isCurrentUrl |
( |
|
$sURL, |
|
|
|
$sServerHost |
|
) |
| |
Check if URL is same as used for request.
- Parameters
-
string | $sURL | URL to check if is same as request. |
string | $sServerHost | request URL. |
- Returns
- bool true if $sURL is equal to current page URL
Definition at line 411 of file oxutilsserver.php.
oxUtilsServer::_mustSaveToSession |
( |
| ) |
|
|
protected |
Checks if cookie must be saved to session in order to transfer it to different domain
- Returns
- bool
Definition at line 77 of file oxutilsserver.php.
oxUtilsServer::_saveSessionCookie |
( |
|
$sName, |
|
|
|
$sValue, |
|
|
|
$iExpire, |
|
|
|
$sPath, |
|
|
|
$sDomain |
|
) |
| |
|
protected |
Copies cookie info to session
- Parameters
-
string | $sName | cookie name |
string | $sValue | cookie value |
int | $iExpire | expiration time |
string | $sPath | cookie path |
string | $sDomain | cookie domain |
Definition at line 128 of file oxutilsserver.php.
oxUtilsServer::deleteUserCookie |
( |
|
$sShopId = null | ) |
|
Deletes user cookie data
- Parameters
-
string | $sShopId | shop ID (default null) |
Definition at line 302 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
- Parameters
-
string | $sName | cookie param name |
- Returns
- mixed
Definition at line 218 of file oxutilsserver.php.
oxUtilsServer::getRemoteAddress |
( |
| ) |
|
oxUtilsServer::getServerIp |
( |
| ) |
|
oxUtilsServer::getServerName |
( |
| ) |
|
|
private |
Return server system parameter similar as unix uname.
- Returns
- string
Definition at line 461 of file oxutilsserver.php.
oxUtilsServer::getServerNodeId |
( |
| ) |
|
Return server id by server system information.
- Returns
- string
Definition at line 441 of file oxutilsserver.php.
oxUtilsServer::getServerVar |
( |
|
$sServVar = null | ) |
|
returns a server constant
- Parameters
-
string | $sServVar | optional - which server var should be returned, if null returns whole $_SERVER |
- Returns
- mixed
Definition at line 258 of file oxutilsserver.php.
oxUtilsServer::getUserCookie |
( |
|
$sShopId = null | ) |
|
Returns cookie stored used login data
- Parameters
-
string | $sShopId | shop ID (default null) |
- Returns
- string
Definition at line 325 of file oxutilsserver.php.
oxUtilsServer::isCurrentUrl |
( |
|
$sURL | ) |
|
Compares current URL to supplied string
- Parameters
-
- Returns
- bool true if $sURL is equal to current page URL
Definition at line 384 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
- Returns
- bool
Definition at line 350 of file oxutilsserver.php.
oxUtilsServer::loadSessionCookies |
( |
| ) |
|
oxUtilsServer::processUserAgentInfo |
( |
|
$sAgent | ) |
|
Removes MSIE()?()*() from browser agent information
- Parameters
-
string | $sAgent | browser user agent idenfitier |
- Returns
- string
Definition at line 368 of file oxutilsserver.php.
oxUtilsServer::setOxCookie |
( |
|
$sName, |
|
|
|
$sValue = "" , |
|
|
|
$iExpire = 0 , |
|
|
|
$sPath = '/' , |
|
|
|
$sDomain = null , |
|
|
|
$blToSession = true , |
|
|
|
$blSecure = false |
|
) |
| |
sets cookie
- Parameters
-
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 |
- Returns
- bool
Definition at line 43 of file oxutilsserver.php.
oxUtilsServer::setUserCookie |
( |
|
$sUser, |
|
|
|
$sPassword, |
|
|
|
$sShopId = null , |
|
|
|
$iTimeout = 31536000 , |
|
|
|
$sSalt = 'ox' |
|
) |
| |
Sets user info into cookie
- Parameters
-
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 |
Definition at line 281 of file oxutilsserver.php.
Member Data Documentation
oxUtilsServer::$_aUserCookie = array() |
|
protected |
oxUtilsServer::$_blSaveToSession = null |
|
protected |
oxUtilsServer::$_sSessionCookies = array() |
|
protected |
oxUtilsServer::$_sSessionCookiesName = 'aSessionCookies' |
|
protected |
The documentation for this class was generated from the following file: