当前位置: 首页>>代码示例>>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;未经允许,请勿转载。