當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CharsetConverter::utf8_to_entities方法代碼示例

本文整理匯總了PHP中TYPO3\CMS\Core\Charset\CharsetConverter::utf8_to_entities方法的典型用法代碼示例。如果您正苦於以下問題:PHP CharsetConverter::utf8_to_entities方法的具體用法?PHP CharsetConverter::utf8_to_entities怎麽用?PHP CharsetConverter::utf8_to_entities使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TYPO3\CMS\Core\Charset\CharsetConverter的用法示例。


在下文中一共展示了CharsetConverter::utf8_to_entities方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: makeEntities

 /**
  * Will convert the input strings special chars (all above 127) to entities.
  * The string is expected to be encoded in UTF-8
  * This function is used to create strings that can be used in the Click Menu
  * (Context Sensitive Menus). The reason is that the values that are dynamically
  * written into the <div> layer is decoded as iso-8859-1 no matter what charset
  * is used in the document otherwise (only MSIE, Mozilla is OK).
  * So by converting we by-pass this problem.
  *
  * @param string $str Input string
  * @return string Output string
  */
 public function makeEntities($str)
 {
     // Convert string back again, but using the full entity conversion:
     return $this->csConvObj->utf8_to_entities($str);
 }
開發者ID:Mr-Robota,項目名稱:TYPO3.CMS,代碼行數:17,代碼來源:LanguageService.php

示例2: makeEntities

 /**
  * Will convert the input strings special chars (all above 127) to entities.
  * The string is expected to be encoded in UTF-8
  * This function is used to create strings that can be used in the Click Menu
  * (Context Sensitive Menus). The reason is that the values that are dynamically
  * written into the <div> layer is decoded as iso-8859-1 no matter what charset
  * is used in the document otherwise (only MSIE, Mozilla is OK).
  * So by converting we by-pass this problem.
  *
  * @param string $str Input string
  * @return string Output string
  * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
  */
 public function makeEntities($str)
 {
     GeneralUtility::logDeprecatedFunction();
     // Convert string back again, but using the full entity conversion:
     return $this->csConvObj->utf8_to_entities($str);
 }
開發者ID:TYPO3Incubator,項目名稱:TYPO3.CMS,代碼行數:19,代碼來源:LanguageService.php


注:本文中的TYPO3\CMS\Core\Charset\CharsetConverter::utf8_to_entities方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。