本文整理汇总了PHP中XLite\Core\Converter::makeURLValid方法的典型用法代码示例。如果您正苦于以下问题:PHP Converter::makeURLValid方法的具体用法?PHP Converter::makeURLValid怎么用?PHP Converter::makeURLValid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XLite\Core\Converter
的用法示例。
在下文中一共展示了Converter::makeURLValid方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFrontURL
/**
* Get front URL
*
* @return string
*/
public function getFrontURL()
{
$result = null;
if ($this->getId()) {
$result = \XLite\Core\Converter::makeURLValid(\XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('page', '', array('id' => $this->getId()), 'cart.php', true)));
}
return $result;
}
示例2: buildURL
/**
* Compose URL from target, action and additional params
*
* @param string $target Page identifier OPTIONAL
* @param string $action Action to perform OPTIONAL
* @param array $params Additional params OPTIONAL
* @param boolean $forceCuFlag Force flag - use Clean URL OPTIONAL
*
* @return string
*/
public function buildURL($target = '', $action = '', array $params = array(), $forceCuFlag = null)
{
return \XLite\Core\Converter::makeURLValid(\XLite\Core\Handler::buildURL($target, $action, $params, $forceCuFlag));
}
示例3: preprocessOpenGraphMetaTags
/**
* Preprocess Open Graph meta tags
*
* @param string $tags Tags content
*
* @return string
*/
protected function preprocessOpenGraphMetaTags($tags)
{
$categoryURL = $this->getParent() ? \XLite\Core\Converter::makeURLValid(\XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('category', '', array('category_id' => $this->getCategoryId()), \XLite::getCustomerScript()))) : \XLite::getInstance()->getShopURL();
return str_replace(array('[PAGE_URL]', '[IMAGE_URL]'), array($categoryURL, $this->getImage() ? $this->getImage()->getFrontURL() : ''), $tags);
}
示例4: getFrontURL
/**
* Get front URL
*
* @return string
*/
public function getFrontURL()
{
return $this->getProductId() ? \XLite\Core\Converter::makeURLValid(\XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('product', '', array('product_id' => $this->getProductId()), \XLite::CART_SELF))) : null;
}
示例5: getURL
/**
* Get URL
*
* @return string
*/
public function getURL()
{
$url = null;
if ($this->isURL()) {
$url = $this->getPath();
} elseif (static::STORAGE_RELATIVE == $this->getStorageType()) {
$url = \XLite::getInstance()->getShopURL($this->getWebRoot() . $this->convertPathToURL($this->getPath()), \XLite\Core\Request::getInstance()->isHTTPS());
} else {
$root = $this->getFileSystemRoot();
if (0 === strncmp($root, $this->getPath(), strlen($root))) {
$path = substr($this->getPath(), strlen($root));
$url = \XLite::getInstance()->getShopURL($this->getWebRoot() . $this->convertPathToURL($path), \XLite\Core\Request::getInstance()->isHTTPS());
} else {
$url = $this->getGetterURL();
}
}
return \XLite\Core\Converter::makeURLValid($url);
}
示例6: getFrontURL
/**
* Get front URL
*
* @return string
*/
public function getFrontURL()
{
$url = null;
if ($this->getId()) {
$url = \XLite\Core\Converter::makeURLValid(\XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('newsMessage', '', array('id' => $this->getId()), \XLite::CART_SELF, true)));
}
return $url;
}