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


PHP CBXPunycode::toASCII方法代码示例

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


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

示例1: appendIBlockEntry

 public function appendIBlockEntry($url, $modifiedDate, $priority = 0)
 {
     if ($this->isExists()) {
         $this->appendEntry(array('XML_LOC' => $this->settings['PROTOCOL'] . '://' . \CBXPunycode::toASCII($this->settings['DOMAIN'], $e = null) . $url, 'XML_LASTMOD' => date('c', $modifiedDate - \CTimeZone::getOffset()), 'XML_PRIORITY' => $priority ? $priority : self::DEFAULT_PRIORITY));
     } else {
         $this->addHeader();
         $this->addIBlockEntry($url, $modifiedDate, $priority);
         $this->addFooter();
     }
 }
开发者ID:ASDAFF,项目名称:seo-sitemap-pro,代码行数:10,代码来源:SitemapRuntimeEx.php

示例2: appendIndexEntry

 public function appendIndexEntry($file)
 {
     if ($this->isExists()) {
         $fileUrlEnc = Converter::getXmlConverter()->encode($this->settings['PROTOCOL'] . '://' . \CBXPunycode::toASCII($this->settings['DOMAIN'], $e = null) . $this->getFileUrl($file));
         $contents = $this->getContents();
         $reg = "/" . sprintf(preg_quote(self::ENTRY_TPL, "/"), preg_quote($fileUrlEnc, "/"), "[^<]*") . "/";
         $newEntry = sprintf(self::ENTRY_TPL, $fileUrlEnc, date(c, $file->getModificationTime($file)));
         $count = 0;
         $contents = preg_replace($reg, $newEntry, $contents, 1, $count);
         if ($count <= 0) {
             $contents = substr($contents, 0, -strlen(self::FILE_FOOTER)) . $newEntry . self::FILE_FOOTER;
         }
         $this->putContents($contents);
     } else {
         $this->createIndex(array($file));
     }
 }
开发者ID:supertest223,项目名称:bitrixtest,代码行数:17,代码来源:sitemapindex.php

示例3: getUrl

	/**
	 * Returns sitemap file URL
	 *
	 * @return string
	 */
	public function getUrl()
	{
		return $this->settings['PROTOCOL'].'://'.\CBXPunycode::toASCII($this->settings['DOMAIN'], $e = null).$this->getFileUrl($this);
	}
开发者ID:nycmic,项目名称:bittest,代码行数:9,代码来源:sitemapfile.php

示例4: processSiteResult

 protected function processSiteResult($res)
 {
     $obXml = new \CDataXML();
     if ($obXml->loadString($res)) {
         $hostName = $obXml->getTree()->elementsByName('name');
         $hostName = \CBXPunycode::toASCII(ToLower($hostName[0]->textContent()), $e = null);
         if (preg_match("/^https:\\/\\//", $hostName)) {
             $hostName = substr($hostName, 8);
         }
         $this->engineSettings['SITES'][$hostName]['SERVICES'] = array();
         $arLinks = $obXml->getTree()->elementsByName('link');
         foreach ($arLinks as $link) {
             $this->engineSettings['SITES'][$hostName]['SERVICES'][$link->getAttribute('rel')] = $link->getAttribute('href');
         }
         $this->saveSettings();
         return true;
     }
     return false;
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:19,代码来源:yandex.php

示例5: getFeeds

 public function getFeeds()
 {
     $queryResult = $this->queryJson(self::QUERY_BASE . self::SCOPE_FEED_SITES);
     if ($queryResult->getStatus() == self::HTTP_STATUS_OK && strlen($queryResult->getResult()) > 0) {
         $result = Json::decode($queryResult->getResult());
         $response = array();
         if (is_array($result)) {
             foreach ($result['siteEntry'] as $key => $siteInfo) {
                 $siteUrlInfo = parse_url($siteInfo['siteUrl']);
                 if ($siteUrlInfo) {
                     $errors = array();
                     $hostKey = \CBXPunycode::toASCII($siteUrlInfo["host"], $errors);
                     if (count($errors) > 0) {
                         $hostKey = $siteUrlInfo["host"];
                     }
                     $response[$hostKey] = array('binded' => $siteInfo["permissionLevel"] !== "siteRestrictedUser", 'verified' => $siteInfo["permissionLevel"] !== "siteRestrictedUser" && $siteInfo["permissionLevel"] !== "siteUnverifiedUser");
                 }
             }
         }
         return $response;
     } else {
         throw new \Exception('Query error! ' . $queryResult->getStatus() . ': ' . $queryResult->getResult());
     }
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:24,代码来源:google.php


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