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


PHP BFCHelper::getSlug方法代码示例

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


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

示例1: setBreadcrumb

 function setBreadcrumb($merchant, $layout = '')
 {
     $mainframe = JFactory::getApplication();
     $pathway = $mainframe->getPathway();
     $pathway->addItem($merchant->Name, JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name)));
     if ($layout != '') {
         $pathway->addItem(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_MERCHANTDETAILS_LAYOUT_' . strtoupper($layout)), JRoute::_('index.php?layout=' . $layout . '&option=com_bookingforconnector&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name)));
     }
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:9,代码来源:view.raw.php

示例2: setBreadcrumb

 function setBreadcrumb($resource, $layout = '')
 {
     $mainframe = JFactory::getApplication();
     $pathway = $mainframe->getPathway();
     $pathway->addItem($resource->Merchant->Name, JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->Merchant->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name)));
     $pathway->addItem(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_MERCHANTDETAILS_LAYOUT_' . strtoupper($layout)), JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&layout=' . $layout . '&merchantId=' . $resource->Merchant->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name)));
     //		$resourceName = BFCHelper::getLanguage($resource->Name, $this->Language);
     $resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
     $pathway->addItem($resourceName, JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)));
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:10,代码来源:view.raw.php

示例3: setBreadcrumb

 function setBreadcrumb($resource, $layout = '', $language)
 {
     if (!empty($resource)) {
         $mainframe = JFactory::getApplication();
         $pathway = $mainframe->getPathway();
         // resetto il pathway
         $pathway->setPathway(null);
         //				$resourceName = BFCHelper::getLanguage($resource->Name, $language);
         $resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
         $pathway->addItem($resource->MerchantName, JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($resource->MerchantName)));
         $pathway->addItem($resourceName, JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)));
     }
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:13,代码来源:resourceview.php

示例4: setBreadcrumb

 function setBreadcrumb($resource, $layout = '', $language)
 {
     if (!empty($resource)) {
         $mainframe = JFactory::getApplication();
         $pathway = $mainframe->getPathway();
         // resetto il pathway
         //				$pathway->setPathway(null);
         $count = count($pathway);
         $newPathway = array();
         if ($count > 1) {
             $newPathway = array_pop($pathway);
         }
         $pathway->setPathway($newPathway);
         //				$resourceName = BFCHelper::getLanguage($resource->Name, $language);
         $resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
         //				$pathway->addItem(
         //					$resource->Merchant->Name,
         //					JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name))
         //				);
         $pathway->addItem($resourceName, JRoute::_('index.php?option=com_bookingforconnector&view=condominium&resourceId=' . $resource->CondominiumId . ':' . BFCHelper::getSlug($resourceName)));
     }
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:22,代码来源:resourceview.php

示例5: AND

//$resourceImageUrl = JURI::base() . "media/com_bookingfor/images/default.png";
//if ($resource->ImageUrl != '') {
//	$resourceImageUrl = BFCHelper::getImageUrl('condominiums',$resource->ImageUrl, 'condominium_map_default');
//}elseif ($merchant->LogoUrl != ''){
//	$resourceImageUrl = BFCHelper::getImageUrl('merchant',$merchant->LogoUrl, 'condominium_map_default');
//}
//-------------------pagina per i l redirect di tutte le risorse in vendita
$db = JFactory::getDBO();
$uri = 'index.php?option=com_bookingforconnector&view=condominium';
$db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uri) . ' AND (language=' . $db->Quote($language) . ' OR language=' . $db->Quote('*') . ') AND published = 1  LIMIT 1');
$itemId = $db->getErrorNum() ? 0 : intval($db->loadResult());
//-------------------pagina per i l redirect di tutte le risorsein vendita
if ($itemId != 0) {
    $uri .= '&resourceId=' . $resource->CondominiumId . ':' . BFCHelper::getSlug($resourceName) . '&Itemid=' . $itemId;
} else {
    $uri .= '&resourceId=' . $resource->CondominiumId . ':' . BFCHelper::getSlug($resourceName);
}
$route = JRoute::_($uri);
$indirizzo = "";
$cap = "";
$comune = "";
$provincia = "";
if (empty($resource->AddressData)) {
    $indirizzo = $resource->Address;
    $cap = $resource->ZipCode;
    $comune = $resource->CityName;
    $provincia = $resource->RegionName;
} else {
    $addressData = $resource->AddressData;
    $indirizzo = BFCHelper::getItem($addressData, 'indirizzo');
    $cap = BFCHelper::getItem($addressData, 'cap');
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:31,代码来源:map.php

示例6: array

   </div>
		<?php 
} else {
    ?>
			<?php 
    if ($merchant->RatingsContext !== 0 && $merchant->RatingsContext !== 2) {
        ?>
				<div class="alert alert-block">
					<?php 
        echo JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RATING_NO_RESULT');
        ?>
					<?php 
        if (($this->item->RatingsContext === 1 || $this->item->RatingsContext === 3) && ($this->item->RatingsType == 0 || $this->item->RatingsType == 2)) {
            ?>
						<?php 
            echo JHTML::link(JRoute::_('index.php?option=com_bookingforconnector&layout=rating&view=merchantdetails&merchantId=' . $this->item->MerchantId . ':' . BFCHelper::getSlug($this->item->Name), true, -1), JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RATING_BUTTON_COMMENT'), array('class' => 'btn btn-info'));
            ?>
					<?php 
        }
        ?>
	
				</div>
			<?php 
    }
    ?>
	
		<?php 
}
?>
	
</div>
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:31,代码来源:ratings.php

示例7: defined

/**
 * @package   Bookingforconnector
 * @copyright Copyright (c)2006-2016 Ipertrade
 * @license   GNU General Public License version 3, or later
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$this->document->setTitle($this->item->Name);
$this->document->setDescription(BFCHelper::getLanguage($this->item->Description, $this->language));
$merchant = $this->item;
$db = JFactory::getDBO();
$uriMerchant = 'index.php?option=com_bookingforconnector&view=merchantdetails';
$db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uriMerchant . '%') . ' AND (language=' . $db->Quote($this->language) . ' OR language=' . $db->Quote('*') . ') AND published = 1 LIMIT 1');
$itemIdMerchant = $db->getErrorNum() ? 0 : intval($db->loadResult());
//$itemIdMerchant = intval($db->loadResult());
$uriMerchant .= '&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name);
if ($itemIdMerchant != 0) {
    $uriMerchant .= '&Itemid=' . $itemIdMerchant;
}
$uriMerchantthanks = $uriMerchant . '&layout=thanks';
$uriMerchant .= '&layout=contacts';
$route = JRoute::_($uriMerchant);
$routeThanks = JRoute::_($uriMerchantthanks);
$cNationList = BFCHelper::parseArrayList(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEW_CONSTANTS_NATIONSLIST'));
//$cLanguageList = BFCHelper::parseArrayList(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEW_CONSTANTS_LANGUAGESLIST'));
$cultureCode = strtolower(substr($this->language, 0, 2));
$nationCode = strlen($this->language) == 5 ? strtolower(substr($this->language, 3, 2)) : $cultureCode;
$keys = array_keys($cNationList);
$nations = array_values(array_filter($keys, function ($item) use($nationCode) {
    return strtolower($item) == $nationCode;
}));
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:31,代码来源:package.php

示例8:

    $isMapMarkerVisible = $resource->IsMapMarkerVisible;
    $showResourceMap = false;
    //(($resourceLat != null) && ($resourceLon !=null) && $isMapVisible && $isMapMarkerVisible);
    if ($itemId != 0) {
        $route = JRoute::_($uri . '&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName) . '&Itemid=' . $itemId);
    } else {
        $route = JRoute::_($uri . '&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
    }
    if ($itemIdMerchant != 0) {
        $uriMerchant .= '&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($merchant->Name) . '&Itemid=' . $itemIdMerchant;
    } else {
        $uriMerchant .= '&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($merchant->Name);
    }
    $routeMerchant = JRoute::_($uriMerchant);
    $routeInfoRequest = JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&layout=inforequestpopup&tmpl=component&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
    $routeRapidView = JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&layout=rapidview&tmpl=component&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
    ?>
	<div class="com_bookingforconnector_search-resource">
		<div class="com_bookingforconnector_merchantdetails-resource" id="container<?php 
    echo $resource->ResourceId;
    ?>
"> 
			<div class="<?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
    ?>
 ">
					<div class="<?php 
    echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
    ?>
9 borderright minhlist">
						<div class="com_bookingforconnector_merchantdetails-resource-features">
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:31,代码来源:favorites.php

示例9: array

//echo ("<pre>");
//echo (print_r($user));
//echo ("</pre>");
?>
<div class="com_bookingforconnector_resource com_bookingforconnector_resource-mt<?php 
echo $merchant->MerchantTypeId;
?>
 com_bookingforconnector_resource-t<?php 
echo $resource->MasterTypologyId;
?>
">
	<?php 
if ($merchant->RatingsContext === 2 || $merchant->RatingsContext === 3) {
    ?>
		<?php 
    echo JHTML::link(JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->UnitId . ':' . BFCHelper::getSlug($resourceName), true, -1), JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RATING_RETURN'), array('class' => ' pull-right'));
    ?>
	<?php 
}
?>
	<h2 class="com_bookingforconnector_resource-name"><?php 
echo $resourceName;
?>
 
		<span class="com_bookingforconnector_resource-rating com_bookingforconnector_resource-rating<?php 
echo $merchant->Rating;
?>
">
			<!-- <span class="com_bookingforconnector_resource-ratingText">Rating <?php 
echo $merchant->Rating;
?>
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:31,代码来源:rating.php

示例10: array

		</div>	
		<?php 
    }
    ?>
	
	</div>

		<?php 
} else {
    ?>
		<div class="alert alert-block">
			<?php 
    echo JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RATING_NO_RESULT');
    ?>
			<?php 
    echo JHTML::link(JRoute::_('index.php?option=com_bookingforconnector&layout=rating&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName), true, -1), JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RATING_BUTTON_COMMENT'), array('class' => ' btn btn-info'));
    ?>
		</div>
		<?php 
}
?>
	
</div>
<script type="text/javascript">
jQuery(function($) {
	$('.moduletable-insearch').show();
	$('span.expander').expander({
		slicePoint: 280,
		expandText:'<?php 
echo JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RATING_PLUS');
?>
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:31,代码来源:ratings.php

示例11: StdClass

     $result->Price = 0;
     $result->TotalPrice = 0;
     $onlystay = false;
 }
 $showResourceMap = $resourceLat != null && $resourceLon != null;
 $currUriresource = $uri . '&resourceId=' . $result->ResourceId . ':' . BFCHelper::getSlug($resourceName);
 if ($itemId != 0) {
     $currUriresource .= '&Itemid=' . $itemId;
 }
 $route = JRoute::_($currUriresource);
 $routeRating = JRoute::_($currUriresource . '&layout=rating');
 $routeInfoRequest = JRoute::_($currUriresource . '&layout=inforequestpopup&tmpl=component');
 $routeRapidView = JRoute::_($currUriresource . '&layout=rapidview&tmpl=component');
 $routeMerchant = "";
 if ($isportal) {
     $currUriMerchant = $uriMerchant . '&merchantId=' . $result->MerchantId . ':' . BFCHelper::getSlug($result->MrcName);
     if ($itemIdMerchant != 0) {
         $currUriMerchant .= '&Itemid=' . $itemIdMerchant;
     }
     $routeMerchant = JRoute::_($currUriMerchant);
 }
 $bookingType = 0;
 $availability = 0;
 $ribbonofferdisplay = "hidden";
 $classofferdisplay = "";
 $stay = new StdClass();
 if ($isFromSearch) {
     $availability = $result->Availability;
     $bookingType = $result->BookingType;
     if ($result->Price < $result->TotalPrice || $result->IsOffer) {
         $ribbonofferdisplay = "";
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:31,代码来源:default_resources.php

示例12: elseif

<?php

$merchant = $this->item;
$resource = $this->item->currentOnSellUnit;
$resourceName = BFCHelper::getLanguage($resource->Name, $this->language);
$addressData = $resource->Address;
//$merchantAddress = false;
//if ($addressData == '' || $addressData == null || $merchant->MerchantTypeId != 2) {
//	$addressData = $merchant->AddressData;
//	$merchantAddress = true;
//}
$route = JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&layout=onsellunit&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name) . '&onsellunitid=' . $resource->OnSellUnitId . ':' . BFCHelper::getSlug($resourceName));
$resourceImageUrl = "/media/com_bookingfor/images/default.png";
if ($resource->ImageUrl != '') {
    $resourceImageUrl = BFCHelper::getImageUrl('onsellunits', $resource->ImageUrl, 'onsellunit_list_default');
} elseif ($merchant->LogoUrl != '') {
    $resourceImageUrl = BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'resource_list_default_logo');
}
?>

	<div class="com_bookingforconnector_search-resource">
		<div class="com_bookingforconnector_merchantdetails-resource">
			<div class="com_bookingforconnector_merchantdetails-resource-features">
				<a class="com_bookingforconnector_resource-imgAnchor" href="<?php 
echo $route;
?>
"><img class="com_bookingforconnector_resource-img" src="<?php 
echo $resourceImageUrl;
?>
" /></a>
				<h3 class="com_bookingforconnector_merchantdetails-resource-name"><a class="com_bookingforconnector_resource-resource-nameAnchor" href="<?php 
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:31,代码来源:onsellunits_onsellunit.php

示例13: getCategoryPriceMqAverages

 public function getCategoryPriceMqAverages($language = '', $locationid)
 {
     $options = array('path' => $this->urlCategoryPriceMqAverages, 'data' => array('$format' => 'json', 'start' => '', 'end' => '', 'locationzone' => ''));
     if (isset($locationid) && $locationid != 0) {
         $options['data']['locationid'] = $locationid . "L";
         // se è un Long il dato deve essere passato come stringa $locationid;
     }
     $url = $this->helper->getQuery($options);
     $resources = null;
     $r = $this->helper->executeQuery($url);
     if (isset($r)) {
         $res = json_decode($r);
         if (!empty($res->d->results)) {
             $resources = $res->d->results;
         } elseif (!empty($res->d)) {
             $resources = $res->d;
         }
         ///		$route = JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
         if (!empty($resources)) {
             foreach ($resources as $resource) {
                 $resourceName = BFCHelper::getLanguage($resource->Name, $language);
                 $resource->Url = JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
                 //				LocationID
                 if (!empty($resource->CityId)) {
                     $resource->LocationId = $resource->CityId;
                 }
                 //				UnitCategoryID
                 if (!empty($resource->CategoryId)) {
                     $resource->UnitCategoryID = $resource->CategoryId;
                 }
                 //				UnitCategoryName
                 if (!empty($resource->CategoryName)) {
                     $resource->UnitCategoryName = $resource->CategoryName;
                 }
                 //				LocationZone
                 if (!empty($resource->ZoneName)) {
                     $resource->LocationZone = $resource->ZoneName;
                 }
                 //				LocationAndUnitCategoryAverage
                 if (!empty($resource->ZoneCategoryAverage)) {
                     $resource->LocationAndUnitCategoryAverage = $resource->ZoneCategoryAverage;
                 }
                 //				UnitCategoryAverage
                 if (!empty($resource->CategoryAverage)) {
                     $resource->UnitCategoryAverage = $resource->CategoryAverage;
                 }
             }
         }
     }
     return $resources;
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:51,代码来源:onsellunits.php

示例14:

&task=GetPhoneByMerchantId&language=' + cultureCode,this)"  id="phone<?php 
            echo $merchant->MerchantId;
            ?>
"><?php 
            echo JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_SHOWPHONE');
            ?>
</a></span>					
						<?php 
        }
        ?>
						<?php 
        if ($merchantSiteUrl != '') {
            ?>
 
						- <?php 
            echo JHTML::link(JRoute::_('index.php?option=com_bookingforconnector&layout=redirect&view=merchantdetails&tmpl=component&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name), true, -1), JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTLIST_SITEGO'), 'target="_blank"');
            ?>
						<!-- - <?php 
            echo JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_URL');
            ?>
: <a href="<?php 
            echo $merchantSiteUrl;
            ?>
" target="_blank"><?php 
            echo $merchant->SiteUrl;
            ?>
</a> -->
						<?php 
        }
        ?>
						 - <a class="boxedpopup com_bookingforconnector_email" href="<?php 
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:31,代码来源:default.php

示例15: AND

$config = $this->config;
$isportal = $config->get('isportal', 1);
$usessl = $config->get('usessl', 0);
$ssllogo = $config->get('ssllogo', '');
$formlabel = $config->get('formlabel', '');
$user = JFactory::getUser();
$merchant = $this->item;
if ($merchant->RatingsContext !== 1 && $merchant->RatingsContext !== 3) {
    //redirect almerchant senza possibilità di renensirla
    $language = $this->language;
    $db = JFactory::getDBO();
    $uriMerchant = 'index.php?option=com_bookingforconnector&view=merchantdetails';
    $db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uriMerchant . '%') . ' AND (language=' . $db->Quote($language) . ' OR language=' . $db->Quote('*') . ') AND published = 1 LIMIT 1');
    $itemIdMerchant = $db->getErrorNum() ? 0 : intval($db->loadResult());
    //$itemIdMerchant = intval($db->loadResult());
    $uriMerchant .= '&merchantId=' . $this->item->MerchantId . ':' . BFCHelper::getSlug($this->item->Name);
    if ($itemIdMerchant != 0) {
        $uriMerchant .= '&Itemid=' . $itemIdMerchant;
    }
    $route = JRoute::_($uriMerchant);
    header("Location: " . $route);
    $app = JFactory::getApplication();
    $app->close();
}
//if (!$user->guest) {
//  echo 'You are logged in as:<br />';
//  echo 'User name: ' . $user->username . '<br />';
//  echo 'Real name: ' . $user->name . '<br />';
//  echo 'User ID  : ' . $user->id . '<br />';
//}
//echo ("<pre>");
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:31,代码来源:rating.php


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