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) |
| __call ($sMethod, $aArgs) |
| __construct () |
| getConfig () |
| setConfig ($oConfig) |
| getSession () |
| setSession ($oSession) |
| getUser () |
| setUser ($oUser) |
| isAdmin () |
| setAdminMode ($blAdmin) |
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 |
Definition at line 432 of file oxutilsurl.php.
oxUtilsUrl::_addLanguageHost |
( |
|
$aLanguageUrls, |
|
|
& |
$aHosts |
|
) |
| |
|
protected |
Appends language urls to $aHosts.
- Parameters
-
array | $aLanguageUrls | array of language urls to extract |
array | &$aHosts | hosts array |
Definition at line 447 of file oxutilsurl.php.
oxUtilsUrl::_addMallHosts |
( |
& |
$aHosts | ) |
|
|
protected |
Appends shop mall urls to $aHosts.
- Parameters
-
Definition at line 490 of file oxutilsurl.php.
oxUtilsUrl::_getHosts |
( |
| ) |
|
|
protected |
Collects and returns current shop hosts array.
- Returns
- array
Definition at line 461 of file oxutilsurl.php.
oxUtilsUrl::_getShopHostName |
( |
| ) |
|
|
private |
oxUtilsUrl::_getUrlParametersSeparator |
( |
|
$sUrl | ) |
|
|
private |
Returns url separator (?,&) for adding new parameters.
- Parameters
-
- Returns
- string
Definition at line 501 of file oxutilsurl.php.
oxUtilsUrl::addShopHost |
( |
|
$sUrl | ) |
|
Adds shop host if url does not start with it.
- Parameters
-
- Returns
- string
Definition at line 209 of file oxutilsurl.php.
oxUtilsUrl::appendParamSeparator |
( |
|
$sUrl | ) |
|
append parameter separator - '?' if it is not in the url or & otherwise
- Parameters
-
- Returns
- string
Definition at line 361 of file oxutilsurl.php.
oxUtilsUrl::appendUrl |
( |
|
$sUrl, |
|
|
|
$aAddParams, |
|
|
|
$blFinalUrl = false |
|
) |
| |
Appends url with given parameters
- Parameters
-
string | $sUrl | url to append |
array | $aAddParams | parameters to append |
bool | $blFinalUrl | final url |
- Returns
- string
Definition at line 157 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 187 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 321 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 |
( |
| ) |
|
static oxUtilsUrl::getInstance |
( |
| ) |
|
|
static |
oxUtilsUrl::isCurrentShopHost |
( |
|
$sUrl | ) |
|
Compares current URL to supplied string
- Parameters
-
- Returns
- bool true if $sUrl is equal to current page URL.
Definition at line 271 of file oxutilsurl.php.
oxUtilsUrl::prepareCanonicalUrl |
( |
|
$sUrl | ) |
|
Prepares canonical url
- Parameters
-
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
-
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 302 of file oxutilsurl.php.
oxUtilsUrl::processShopUrl |
( |
|
$sUrl, |
|
|
|
$blFinalUrl = true , |
|
|
|
$iLang = null |
|
) |
| |
Adds additional shop url parameters, session id, language id when needed.
- Parameters
-
string | $sUrl | url to process. |
bool | $blFinalUrl | should url be finalized or should it end with ? or &. |
int | $iLang | url target language. |
- Returns
- string
Definition at line 249 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 229 of file oxutilsurl.php.
oxUtilsUrl::stringToParamsArray |
( |
|
$sValue | ) |
|
Forms parameters array out of a string Takes & and & as delimiters Returns associative array with parameters
- Parameters
-
- Returns
- array
Definition at line 410 of file oxutilsurl.php.
Member Data Documentation
oxUtilsUrl::$_aAddUrlParams = null |
|
protected |
oxUtilsUrl::$_aHosts = null |
|
protected |
oxUtilsUrl::$_instance = null |
|
staticprivate |
The documentation for this class was generated from the following file: