OXID eShop CE  4.9.10
 All Classes Files Functions Variables Pages
oxUtilsUrl Class Reference
+ Inheritance diagram for oxUtilsUrl:
+ Collaboration diagram for oxUtilsUrl:

Public Member Functions

 getBaseAddUrlParams ()
 getAddUrlParams ()
 prepareUrlForNoSession ($sUrl)
 prepareCanonicalUrl ($sUrl)
 appendUrl ($sUrl, $aAddParams, $blFinalUrl=false)
 cleanUrl ($sUrl, $aParams=null)
 addShopHost ($sUrl)
 processUrl ($sUrl, $blFinalUrl=true, $aParams=null, $iLang=null)
 processShopUrl ($sUrl, $blFinalUrl=true, $iLang=null)
 isCurrentShopHost ($sUrl)
 processSeoUrl ($sUrl)
 cleanUrlParams ($sUrl, $sConnector= '&')
 appendParamSeparator ($sUrl)
 getCurrentUrl ()
 stringToParamsArray ($sValue)
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Protected Member Functions

 _addHost ($sUrl, &$aHosts)
 _addLanguageHost ($aLanguageUrls, &$aHosts)
 _getHosts ()
 _addMallHosts (&$aHosts)

Protected Attributes

 $_aAddUrlParams = null
 $_aHosts = null

Private Member Functions

 _getUrlParametersSeparator ($sUrl)

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

URL utility class

Definition at line 6 of file oxutilsurl.php.

Member Function Documentation

oxUtilsUrl::_addHost (   $sUrl,
$aHosts 
)
protected

Extracts host from given url and appends $aHosts with it

Parameters
string$sUrlurl to extract
array&$aHostshosts array

Definition at line 428 of file oxutilsurl.php.

oxUtilsUrl::_addLanguageHost (   $aLanguageUrls,
$aHosts 
)
protected

Appends language urls to $aHosts.

Parameters
array$aLanguageUrlsarray of language urls to extract
array&$aHostshosts array

Definition at line 443 of file oxutilsurl.php.

oxUtilsUrl::_addMallHosts ( $aHosts)
protected

Appends shop mall urls to $aHosts.

Parameters
array&$aHostshosts array

Definition at line 486 of file oxutilsurl.php.

oxUtilsUrl::_getHosts ( )
protected

Collects and returns current shop hosts array.

Returns
array

Definition at line 457 of file oxutilsurl.php.

oxUtilsUrl::_getUrlParametersSeparator (   $sUrl)
private

Returns url separator (?,&) for adding new parameters.

Parameters
string$sUrl
Returns
string

Definition at line 497 of file oxutilsurl.php.

oxUtilsUrl::addShopHost (   $sUrl)

Adds shop host if url does not start with it.

Parameters
string$sUrl
Returns
string

Definition at line 204 of file oxutilsurl.php.

oxUtilsUrl::appendParamSeparator (   $sUrl)

Appends parameter separator - '?' if it is not in the url or & otherwise.

Parameters
string$sUrlurl
Returns
string

Definition at line 355 of file oxutilsurl.php.

oxUtilsUrl::appendUrl (   $sUrl,
  $aAddParams,
  $blFinalUrl = false 
)

Appends url with given parameters.

Parameters
string$sUrlurl to append
array$aAddParamsparameters to append
bool$blFinalUrlfinal url
Returns
string

Definition at line 146 of file oxutilsurl.php.

oxUtilsUrl::cleanUrl (   $sUrl,
  $aParams = null 
)

Removes any or specified dynamic parameter from given url.

Parameters
string$sUrlurl to clean.
array$aParamsparameters to remove [optional].
Returns
string

Definition at line 177 of file oxutilsurl.php.

oxUtilsUrl::cleanUrlParams (   $sUrl,
  $sConnector = '&' 
)

Remove duplicate GET parameters and clean & and duplicate &.

Parameters
string$sUrlurl to process.
string$sConnectorGET elements connector.
Returns
string

Definition at line 314 of file oxutilsurl.php.

oxUtilsUrl::getAddUrlParams ( )

Returns parameters which should be appended to seo or std url.

Returns
array

Definition at line 40 of file oxutilsurl.php.

oxUtilsUrl::getBaseAddUrlParams ( )

Returns core parameters which must be added to each url.

Returns
array

Definition at line 28 of file oxutilsurl.php.

oxUtilsUrl::getCurrentUrl ( )

Return current url.

Returns
string

Definition at line 375 of file oxutilsurl.php.

oxUtilsUrl::isCurrentShopHost (   $sUrl)

Compares current URL to supplied string.

Parameters
string$sUrl
Returns
bool true if $sUrl is equal to current page URL.

Definition at line 266 of file oxutilsurl.php.

oxUtilsUrl::prepareCanonicalUrl (   $sUrl)

Prepares canonical url.

Parameters
string$sUrlgiven url

public

Returns
string

Definition at line 112 of file oxutilsurl.php.

oxUtilsUrl::prepareUrlForNoSession (   $sUrl)

prepareUrlForNoSession adds extra url params making it usable without session also removes sid=xxxx&.

Parameters
string$sUrlgiven url

public

Returns
string

Definition at line 63 of file oxutilsurl.php.

oxUtilsUrl::processSeoUrl (   $sUrl)

Seo url processor: adds various needed parameters, like currency, shop id.

Parameters
string$sUrlurl to process.
Returns
string

Definition at line 294 of file oxutilsurl.php.

oxUtilsUrl::processShopUrl (   $sUrl,
  $blFinalUrl = true,
  $iLang = null 
)

Adds additional shop url parameters, session id, language id when needed.

Parameters
string$sUrlurl to process.
bool$blFinalUrlshould url be finalized or should it end with ? or &.
int$iLangurl target language.
Returns
string

Definition at line 244 of file oxutilsurl.php.

oxUtilsUrl::processUrl (   $sUrl,
  $blFinalUrl = true,
  $aParams = null,
  $iLang = null 
)

Performs base url processing - adds required parameters to given url.

Parameters
string$sUrlurl to process.
bool$blFinalUrlshould url be finalized or should it end with ? or & (default true).
array$aParamsadditional parameters (default null).
int$iLangurl target language (default null).
Returns
string

Definition at line 224 of file oxutilsurl.php.

oxUtilsUrl::stringToParamsArray (   $sValue)

Forms parameters array out of a string. Takes & and & as delimiters. Returns associative array with parameters.

Parameters
string$sValueString
Returns
array

Definition at line 406 of file oxutilsurl.php.

Member Data Documentation

oxUtilsUrl::$_aAddUrlParams = null
protected

Definition at line 14 of file oxutilsurl.php.

oxUtilsUrl::$_aHosts = null
protected

Definition at line 21 of file oxutilsurl.php.


The documentation for this class was generated from the following file: