|
| getBaseAddUrlParams () |
|
| getAddUrlParams () |
|
| prepareUrlForNoSession ($sUrl) |
|
| prepareCanonicalUrl ($sUrl) |
|
| appendUrl ($sUrl, $parametersToAdd, $blFinalUrl=false, $allowParameterOverwrite=false) |
|
| cleanUrl ($sUrl, $aParams=null) |
|
| addShopHost ($sUrl) |
|
| processUrl ($sUrl, $blFinalUrl=true, $aParams=null, $iLang=null) |
|
| processShopUrl ($sUrl, $blFinalUrl=true, $iLang=null) |
|
| getActiveShopHost () |
|
| extractHost ($url) |
|
| getActiveShopUrlPath () |
|
| extractUrlPath ($shopUrl) |
|
| isCurrentShopHost ($sUrl) |
|
| processSeoUrl ($sUrl) |
|
| cleanUrlParams ($sUrl, $sConnector='&') |
|
| appendParamSeparator ($sUrl) |
|
| getCurrentUrl () |
|
| stringToParamsArray ($sValue) |
|
| getUrlLanguageParameter ($languageId) |
|
◆ _addHost()
OxidEsales\EshopCommunity\Core\UtilsUrl::_addHost |
( |
|
$sUrl, |
|
|
& |
$aHosts |
|
) |
| |
|
protected |
Extracts host from given url and appends $aHosts with it
- Parameters
-
string | $sUrl | url to extract |
array | $aHosts | hosts array |
◆ _addLanguageHost()
OxidEsales\EshopCommunity\Core\UtilsUrl::_addLanguageHost |
( |
|
$aLanguageUrls, |
|
|
& |
$aHosts |
|
) |
| |
|
protected |
Appends language urls to $aHosts.
- Parameters
-
array | $aLanguageUrls | array of language urls to extract |
array | $aHosts | hosts array |
◆ _addMallHosts()
OxidEsales\EshopCommunity\Core\UtilsUrl::_addMallHosts |
( |
& |
$aHosts | ) |
|
|
protected |
Appends shop mall urls to $aHosts if needed
- Parameters
-
◆ _getHosts()
OxidEsales\EshopCommunity\Core\UtilsUrl::_getHosts |
( |
| ) |
|
|
protected |
Collects and returns current shop hosts array.
- Returns
- array
◆ addShopHost()
OxidEsales\EshopCommunity\Core\UtilsUrl::addShopHost |
( |
|
$sUrl | ) |
|
Adds shop host if url does not start with it.
- Parameters
-
- Returns
- string
◆ appendParamSeparator()
OxidEsales\EshopCommunity\Core\UtilsUrl::appendParamSeparator |
( |
|
$sUrl | ) |
|
Appends parameter separator - '?' if it is not in the url or & otherwise.
- Parameters
-
- Returns
- string
◆ appendUrl()
OxidEsales\EshopCommunity\Core\UtilsUrl::appendUrl |
( |
|
$sUrl, |
|
|
|
$parametersToAdd, |
|
|
|
$blFinalUrl = false , |
|
|
|
$allowParameterOverwrite = false |
|
) |
| |
Appends url with given parameters.
- Parameters
-
string | $sUrl | url to append |
array | $parametersToAdd | parameters to append |
bool | $blFinalUrl | final url |
bool | $allowParameterOverwrite | Decides if same parameters should overwrite query parameters. |
- Returns
- string
◆ cleanUrl()
OxidEsales\EshopCommunity\Core\UtilsUrl::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
◆ cleanUrlParams()
OxidEsales\EshopCommunity\Core\UtilsUrl::cleanUrlParams |
( |
|
$sUrl, |
|
|
|
$sConnector = '&' |
|
) |
| |
Remove duplicate GET parameters and clean & and duplicate &.
- Parameters
-
string | $sUrl | url to process. |
string | $sConnector | GET elements connector. |
- Returns
- string
◆ extractHost()
OxidEsales\EshopCommunity\Core\UtilsUrl::extractHost |
( |
|
$url | ) |
|
Extract host from url.
- Parameters
-
- Returns
- string
◆ extractUrlPath()
OxidEsales\EshopCommunity\Core\UtilsUrl::extractUrlPath |
( |
|
$shopUrl | ) |
|
Method returns URL part - path.
- Parameters
-
- Returns
- string|null
◆ getActiveShopHost()
OxidEsales\EshopCommunity\Core\UtilsUrl::getActiveShopHost |
( |
| ) |
|
Method returns active shop host.
- Returns
- string
◆ getActiveShopUrlPath()
OxidEsales\EshopCommunity\Core\UtilsUrl::getActiveShopUrlPath |
( |
| ) |
|
Method returns shop URL part - path.
- Returns
- null|string
◆ getAddUrlParams()
OxidEsales\EshopCommunity\Core\UtilsUrl::getAddUrlParams |
( |
| ) |
|
Returns parameters which should be appended to seo or std url.
- Returns
- array
◆ getBaseAddUrlParams()
OxidEsales\EshopCommunity\Core\UtilsUrl::getBaseAddUrlParams |
( |
| ) |
|
Returns core parameters which must be added to each url.
- Returns
- array
◆ getCurrentUrl()
OxidEsales\EshopCommunity\Core\UtilsUrl::getCurrentUrl |
( |
| ) |
|
Return current url.
- Returns
- string
◆ getUrlLanguageParameter()
OxidEsales\EshopCommunity\Core\UtilsUrl::getUrlLanguageParameter |
( |
|
$languageId | ) |
|
Return array of language key and language value.
- Parameters
-
- Returns
- array
◆ getUrlParametersSeparator()
OxidEsales\EshopCommunity\Core\UtilsUrl::getUrlParametersSeparator |
( |
|
$url | ) |
|
|
private |
Returns url separator (?,&) for adding new parameters.
- Parameters
-
- Returns
- string
◆ isCurrentShopHost()
OxidEsales\EshopCommunity\Core\UtilsUrl::isCurrentShopHost |
( |
|
$sUrl | ) |
|
Compares current URL to supplied string.
- Parameters
-
- Returns
- bool true if $sUrl is equal to current page URL.
◆ mergeDuplicatedParameters()
OxidEsales\EshopCommunity\Core\UtilsUrl::mergeDuplicatedParameters |
( |
|
$aAddParams, |
|
|
|
$query, |
|
|
|
$allowParameterOverwrite = true |
|
) |
| |
|
private |
- Parameters
-
array | $aAddParams | parameters to add to URL |
string | $query | URL query part |
bool | $allowParameterOverwrite | Decides if same parameters should overwrite query parameters |
- Returns
- array
◆ parseUrlAndAppendSchema()
OxidEsales\EshopCommunity\Core\UtilsUrl::parseUrlAndAppendSchema |
( |
|
$url, |
|
|
|
$flag, |
|
|
|
$appendScheme = 'http' |
|
) |
| |
|
private |
Improved url parsing with parse_url as base and scheme checking improvement in url preprocessing
- Parameters
-
string | $url | |
string | $flag | |
string | $appendScheme | Append this scheme to url if no scheme found |
- Returns
- string
◆ prepareCanonicalUrl()
OxidEsales\EshopCommunity\Core\UtilsUrl::prepareCanonicalUrl |
( |
|
$sUrl | ) |
|
Prepares canonical url.
- Parameters
-
@access public
- Returns
- string
◆ prepareUrlForNoSession()
OxidEsales\EshopCommunity\Core\UtilsUrl::prepareUrlForNoSession |
( |
|
$sUrl | ) |
|
prepareUrlForNoSession adds extra url params making it usable without session also removes sid=xxxx&.
- Parameters
-
@access public
- Returns
- string
◆ processSeoUrl()
OxidEsales\EshopCommunity\Core\UtilsUrl::processSeoUrl |
( |
|
$sUrl | ) |
|
Seo url processor: adds various needed parameters, like currency, shop id.
- Parameters
-
string | $sUrl | url to process. |
- Returns
- string
◆ processShopUrl()
OxidEsales\EshopCommunity\Core\UtilsUrl::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
◆ processUrl()
OxidEsales\EshopCommunity\Core\UtilsUrl::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
◆ removeNotSetParameters()
OxidEsales\EshopCommunity\Core\UtilsUrl::removeNotSetParameters |
( |
|
$parametersToAdd | ) |
|
|
private |
Removes parameters which are not set.
- Parameters
-
- Returns
- string
◆ rightTrimAmp()
OxidEsales\EshopCommunity\Core\UtilsUrl::rightTrimAmp |
( |
|
$url | ) |
|
|
private |
◆ stringToParamsArray()
OxidEsales\EshopCommunity\Core\UtilsUrl::stringToParamsArray |
( |
|
$sValue | ) |
|
Forms parameters array out of a string. Takes & and & as delimiters. Returns associative array with parameters.
- Parameters
-
- Returns
- array
◆ $_aAddUrlParams
OxidEsales\EshopCommunity\Core\UtilsUrl::$_aAddUrlParams = null |
|
protected |
◆ $_aHosts
OxidEsales\EshopCommunity\Core\UtilsUrl::$_aHosts = null |
|
protected |
◆ PARAMETER_SEPARATOR
const OxidEsales\EshopCommunity\Core\UtilsUrl::PARAMETER_SEPARATOR = '&' |
The documentation for this class was generated from the following file: