當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。