当前位置: 首页>>代码示例>>PHP>>正文


PHP vRequest::filterUrl方法代码示例

本文整理汇总了PHP中vRequest::filterUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP vRequest::filterUrl方法的具体用法?PHP vRequest::filterUrl怎么用?PHP vRequest::filterUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vRequest的用法示例。


在下文中一共展示了vRequest::filterUrl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getMenuCatItemId

 public function getMenuCatItemId($virtuemart_category_id)
 {
     $itemID = '';
     $virtuemart_manufacturer_id = isset($this->query['virtuemart_manufacturer_id']) ? $this->query['virtuemart_manufacturer_id'] : vRequest::getInt('virtuemart_manufacturer_id', 0);
     $categorylayout = isset($this->query['categorylayout']) ? $this->query['categorylayout'] : vRequest::getCmd('categorylayout', 0);
     $showcategory = isset($this->query['showcategory']) ? $this->query['showcategory'] : vRequest::getInt('showcategory', 1);
     $showproducts = isset($this->query['showproducts']) ? $this->query['showproducts'] : vRequest::getInt('showproducts', 1);
     $productsublayout = isset($this->query['productsublayout']) ? $this->query['productsublayout'] : vRequest::getCmd('productsublayout', 0);
     $jLangTag = $this->Jlang->getTag();
     $links = array();
     $links[] = 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $virtuemart_category_id . '&virtuemart_manufacturer_id=' . $virtuemart_manufacturer_id . '&categorylayout=' . $categorylayout . '&showcategory=' . $showcategory . '&showproducts=' . $showproducts . '&productsublayout=' . $productsublayout;
     $links[] = 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $virtuemart_category_id . '&virtuemart_manufacturer_id=' . $virtuemart_manufacturer_id . '%';
     $links[] = 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $virtuemart_category_id . '&virtuemart_manufacturer_id=0%';
     $db = JFactory::getDbo();
     foreach ($links as $link) {
         $link = vRequest::filterUrl($link);
         $q = 'SELECT * FROM `#__menu` WHERE `link` LIKE "' . $link . '" and published = "1" and `language` = "' . $jLangTag . '"';
         $db->setQuery($q);
         $items = $db->loadObjectList();
         if (empty($items)) {
             $q = 'SELECT * FROM `#__menu` WHERE `link` LIKE "' . $link . '" and published = "1" and `language` = "*"';
             $db->setQuery($q);
             $items = $db->loadObjectList();
         }
         if (!empty($items)) {
             break;
         }
     }
     if (!empty($items[0]->id)) {
         $itemID = $items[0]->id;
     }
     return $itemID;
 }
开发者ID:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:33,代码来源:router.php

示例2: getCleanUrl

 static function getCleanUrl($JURIInstance = 0, $parts = array('scheme', 'user', 'pass', 'host', 'port', 'path', 'query', 'fragment'))
 {
     if (!class_exists('JFilterInput')) {
         require VMPATH_LIBS . DS . 'joomla' . DS . 'filter' . DS . 'input.php';
     }
     //$_filter = JFilterInput::getInstance(array('br', 'i', 'em', 'b', 'strong'), array(), 0, 0, 1);
     if ($JURIInstance === 0) {
         $JURIInstance = JURI::getInstance();
     }
     //return $_filter->clean($JURIInstance->toString($parts));
     return vRequest::filterUrl($JURIInstance->toString($parts));
 }
开发者ID:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:12,代码来源:config.php


注:本文中的vRequest::filterUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。