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


PHP CBXPunycode::GetConverter方法代码示例

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


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

示例1: getConfiguredDomains

 public function getConfiguredDomains()
 {
     $result = array();
     $converter = CBXPunycode::GetConverter();
     $domainName = COption::GetOptionString("main", "server_name", "");
     if ($domainName != "") {
         $result[$domainName] = $domainName;
     }
     $by = "";
     $order = "";
     $siteList = CSite::GetList($by, $order, array("ACTIVE" => "Y"));
     while ($site = $siteList->Fetch()) {
         $domains = explode("\r\n", $site["DOMAINS"]);
         foreach ($domains as $domainName) {
             if ($domainName != "") {
                 $punyName = $converter->Encode($domainName);
                 if ($punyName !== false) {
                     $result[$punyName] = $domainName;
                 }
             }
         }
     }
     ksort($result);
     return $result;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:25,代码来源:monitoring.php

示例2: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
$APPLICATION->SetAdditionalCSS('/bitrix/gadgets/bitrix/bitrixcloud_monitoring/styles.css');
$converter = CBXPunycode::GetConverter();
$saleIncluded = CModule::IncludeModule('sale');
$intervalLang = array("sale" => array(7 => GetMessage("GD_BITRIXCLOUD_MONITOR_MESS_ALERT1_WEEK"), 30 => GetMessage("GD_BITRIXCLOUD_MONITOR_MESS_ALERT1_MONTH"), 90 => GetMessage("GD_BITRIXCLOUD_MONITOR_MESS_ALERT1_QUARTER"), 365 => GetMessage("GD_BITRIXCLOUD_MONITOR_MESS_ALERT1_YEAR")), "uptime" => array(7 => GetMessage("GD_BITRIXCLOUD_MONITOR_MESS_ALERT2_WEEK"), 30 => GetMessage("GD_BITRIXCLOUD_MONITOR_MESS_ALERT2_MONTH"), 90 => GetMessage("GD_BITRIXCLOUD_MONITOR_MESS_ALERT2_QUARTER"), 365 => GetMessage("GD_BITRIXCLOUD_MONITOR_MESS_ALERT2_YEAR")));
$uptime = "";
$testCount = 0;
/** @var CBitrixCloudMonitoringTest $testAlert */
$testAlert = null;
$testDomain = "";
$bAlert = false;
if (CModule::IncludeModule('bitrixcloud')) {
    $monitoring = CBitrixCloudMonitoring::getInstance();
    $monitoringResults = $monitoring->getMonitoringResults();
    if (!is_string($monitoringResults)) {
        if ($monitoringResults->getStatus() === CBitrixCloudMonitoringResult::RED_LAMP) {
            $bAlert = true;
            foreach ($monitoringResults as $domainName => $domainResult) {
                foreach ($domainResult as $testId => $testResult) {
                    if ($testResult->getStatus() === CBitrixCloudMonitoringResult::RED_LAMP) {
                        $testCount++;
                        $testAlert = $testResult;
                        $testDomain = $domainName;
                    }
                }
            }
            $uptime = $monitoring->getWorstUptime("test_http_response_time");
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:index.php

示例3: URLEncode

 function URLEncode($str, $charset)
 {
     global $APPLICATION;
     $strEncodedURL = '';
     $arUrlComponents = preg_split("#(://|/|\\?|=|&)#", $str, -1, PREG_SPLIT_DELIM_CAPTURE);
     foreach ($arUrlComponents as $i => $part_of_url) {
         if ($i % 2) {
             $strEncodedURL .= $part_of_url;
         } else {
             if ($i > 1 && $arUrlComponents[$i - 1] === "://") {
                 $converter = CBXPunycode::GetConverter();
                 $strEncodedURL .= $converter->Encode($part_of_url);
             } else {
                 $strEncodedURL .= urlencode($APPLICATION->ConvertCharset(urldecode($part_of_url), LANG_CHARSET, $charset));
             }
         }
     }
     return $strEncodedURL;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:19,代码来源:sitemap.php


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