Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Private Attributes

oxUtilsUrl Class Reference

Inheritance diagram for oxUtilsUrl:
Collaboration diagram for oxUtilsUrl:

List of all members.

Public Member Functions

 getBaseAddUrlParams ()
 getAddUrlParams ()
 prepareUrlForNoSession ($sUrl)
 prepareCanonicalUrl ($sUrl)
 appendUrl ($sUrl, $aAddParams)
 cleanUrl ($sUrl, $aParams=null)
 processUrl ($sUrl, $blFinalUrl=true, $aParams=null, $iLang=null)
 isCurrentShopHost ($sUrl)
 processSeoUrl ($sUrl)
 cleanUrlParams ($sUrl, $sConnector= '&')
 appendParamSeparator ($sUrl)
 getCurrentUrl ()
 stringToParamsArray ($sValue)

Static Public Member Functions

static getInstance ()

Protected Member Functions

 _addHost ($sUrl, &$aHosts)
 _getHosts ()

Protected Attributes

 $_aAddUrlParams = null
 $_aHosts = null

Static Private Attributes

static $_instance = 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 $sUrl url to extract
array &$aHosts hosts array
Returns:
null

Definition at line 238 of file oxutilsurl.php.

oxUtilsUrl._getHosts (  )  [protected]

Collects and returns current shop hosts array

Returns:
array

Definition at line 252 of file oxutilsurl.php.

oxUtilsUrl.appendParamSeparator ( sUrl  ) 

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

Parameters:
string $sUrl url
Returns:
string

Definition at line 374 of file oxutilsurl.php.

oxUtilsUrl.appendUrl ( sUrl,
aAddParams 
)

Appends url with given parameters

Parameters:
string $sUrl url to append
array $aAddParams parameters to append
Returns:
string

Definition at line 156 of file oxutilsurl.php.

oxUtilsUrl.cleanUrl ( sUrl,
aParams = null 
)

Removes any or specified dynamic parameter from given url

Parameters:
string $sUrl url to clean
array $aParams parameters to remove [optional]
Returns:
string

Definition at line 183 of file oxutilsurl.php.

oxUtilsUrl.cleanUrlParams ( sUrl,
sConnector = '&' 
)

Remove duplicate GET parameters and clean & and duplicate &

Parameters:
string $sUrl url to process
string $sConnector GET elements connector
Returns:
string

Definition at line 334 of file oxutilsurl.php.

oxUtilsUrl.getAddUrlParams (  ) 

Returns parameters which should be appended to seo or std url

Returns:
array

Definition at line 57 of file oxutilsurl.php.

oxUtilsUrl.getBaseAddUrlParams (  ) 

Returns core parameters which must be added to each url

Returns:
array

Definition at line 45 of file oxutilsurl.php.

oxUtilsUrl.getCurrentUrl (  ) 

Return current url

Returns:
string

Definition at line 392 of file oxutilsurl.php.

static oxUtilsUrl.getInstance (  )  [static]

resturns a single instance of this class

Deprecated:
since v5.0 (2012-08-10); Use oxRegistry.get("oxUtilsUrl") instead
Returns:
oxUtilsUrl

Definition at line 35 of file oxutilsurl.php.

oxUtilsUrl.isCurrentShopHost ( sUrl  ) 

Compares current URL to supplied string

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

Definition at line 287 of file oxutilsurl.php.

oxUtilsUrl.prepareCanonicalUrl ( sUrl  ) 

Prepares canonical url

Parameters:
string $sUrl given url

public

Returns:
string

Definition at line 126 of file oxutilsurl.php.

oxUtilsUrl.prepareUrlForNoSession ( sUrl  ) 

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

Parameters:
string $sUrl given url

public

Returns:
string

Definition at line 79 of file oxutilsurl.php.

oxUtilsUrl.processSeoUrl ( sUrl  ) 

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

Parameters:
string $sUrl url to process
Returns:
string

Definition at line 315 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 $sUrl url to process
bool $blFinalUrl should url be finalized or should it end with ? or & (default true)
array $aParams additional parameters (default null)
int $iLang url target language (default null)
Returns:
string

Definition at line 207 of file oxutilsurl.php.

oxUtilsUrl.stringToParamsArray ( sValue  ) 

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

Parameters:
$sValue string
Returns:
array

Definition at line 423 of file oxutilsurl.php.


Member Data Documentation

oxUtilsUrl.$_aAddUrlParams = null [protected]

Definition at line 20 of file oxutilsurl.php.

oxUtilsUrl.$_aHosts = null [protected]

Definition at line 26 of file oxutilsurl.php.

oxUtilsUrl.$_instance = null [static, private]

Definition at line 13 of file oxutilsurl.php.


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