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


PHP StringUtils::ConvertTextToEncoding方法代码示例

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


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

示例1: ConvertTextToEncoding

function ConvertTextToEncoding($text, $sourceEncoding, $targetEncoding)
{
    return StringUtils::ConvertTextToEncoding($text, $sourceEncoding, $targetEncoding);
}
开发者ID:howareyoucolin,项目名称:demo,代码行数:4,代码来源:common_utils.php

示例2: GetViewData

 public function GetViewData(Renderer $renderer)
 {
     $bandsViewData = array();
     foreach ($this->GetViewBands() as $band) {
         $bandsViewData[] = $band->GetViewData();
     }
     $actionsViewData = $this->getActions()->getViewData();
     $rows = array();
     $emptyGridMessage = $this->GetPage()->GetLocalizerCaptions()->GetMessageString('NoDataToDisplay');
     if ($this->RequestFilterFromUser()) {
         $emptyGridMessage = $this->GetPage()->GetLocalizerCaptions()->GetMessageString('CreateFilterConditionFirst');
     } else {
         $rows = $this->GetRowsViewData($renderer);
     }
     $sortableColumns = array();
     $sortableColumnsForJSON = array();
     foreach ($bandsViewData as $band) {
         foreach ($band['Columns'] as $column) {
             if ($column['Sortable']) {
                 $sortableColumn = array('name' => $column['Name'], 'index' => $column['SortIndex'], 'caption' => $column['Caption']);
                 $sortableColumns[$column['Name']] = $sortableColumn;
                 $sortableColumnsForJSON[$column['Name']] = array_merge($sortableColumn, array('caption' => StringUtils::ConvertTextToEncoding($column['Caption'], $this->getPage()->getContentEncoding(), 'UTF-8')));
             }
         }
     }
     return array('SortableColumns' => $sortableColumns, 'SortableColumnsJSON' => json_encode($sortableColumnsForJSON), 'Id' => $this->GetId(), 'MaxWidth' => $this->GetWidth(), 'Classes' => $this->GetGridClasses(), 'Attributes' => $this->GetAdditionalAttributes(), 'HiddenValuesJson' => $this->GetHiddenValuesJson(), 'EmptyGridMessage' => $emptyGridMessage, 'FilterBuilder' => $this->GetShowFilterBuilder() ? $this->GetFilterBuilder()->GetViewData() : null, 'QuickFilter' => $this->GetQuickFilter()->GetViewData(), 'AllowQuickFilter' => $this->GetPage()->GetSimpleSearchAvailable() && $this->UseFilter, 'ActionsPanelAvailable' => $this->GetPage()->GetSimpleSearchAvailable() && $this->UseFilter || $this->GetShowAddButton() || $this->GetShowInlineAddButton() || $this->GetAllowDeleteSelected() || $this->GetShowUpdateLink(), 'Links' => array('ModalInsertDialog' => $this->GetOpenInsertModalDialogLink(), 'InlineEditRequest' => $this->GetInlineEditRequestsAddress(), 'SimpleAddNewRow' => $this->GetAddRecordLink(), 'Refresh' => $this->GetUpdateLink()), 'ActionsPanel' => array('InlineAdd' => $this->GetShowInlineAddButton(), 'AddNewButton' => $this->GetShowAddButton() ? $this->GetUseModalInserting() ? 'modal' : 'simple' : null, 'RefreshButton' => $this->GetShowUpdateLink(), 'DeleteSelectedButton' => $this->GetAllowDeleteSelected()), 'ColumnCount' => count($this->GetViewColumns()) + ($this->GetAllowDeleteSelected() ? 1 : 0) + ($this->GetShowLineNumbers() ? 1 : 0) + ($this->GetHasDetails() ? 1 : 0) + ($actionsViewData ? 1 : 0), 'Bands' => $bandsViewData, 'Actions' => $actionsViewData, 'HasDetails' => $this->GetHasDetails(), 'UseInlineEdit' => $this->GetEnabledInlineEditing(), 'HighlightRowAtHover' => $this->GetHighlightRowAtHover(), 'AllowDeleteSelected' => $this->GetAllowDeleteSelected(), 'ShowLineNumbers' => $this->GetShowLineNumbers(), 'Rows' => $rows, 'Totals' => $this->GetTotalsViewData(), 'GridMessage' => $this->GetGridMessage() == '' ? null : $this->GetGridMessage(), 'ErrorMessage' => $this->GetErrorMessage() == '' ? null : $this->GetErrorMessage(), 'DataSortPriority' => $this->getSortedColumns(), 'EnableRunTimeCustomization' => $this->getEnableRunTimeCustomization(), 'ViewModeList' => ViewMode::getList(), 'ViewMode' => $this->GetViewMode(), 'CardCountInRow' => $this->GetCardCountInRow(), 'CardClasses' => $this->getCardClasses());
 }
开发者ID:outsourcinggithub,项目名称:outsourcing,代码行数:27,代码来源:grid.php

示例3: GetCaptionByName

 private function GetCaptionByName($name)
 {
     $result = eval('global $c' . $name . '; return $c' . $name . ';');
     return StringUtils::ConvertTextToEncoding($result, 'UTF-8', $this->pageEncoding);
 }
开发者ID:martinw0102,项目名称:ProjetSyst,代码行数:5,代码来源:captions.php

示例4: LoadFromJson

 /**
  * @param string $json
  * @return void
  */
 public function LoadFromJson($json)
 {
     $this->root->LoadFromData(SystemUtils::FromJSON(StringUtils::ConvertTextToEncoding($json, $this->contentEncoding, 'UTF-8')), $this->contentEncoding);
 }
开发者ID:outsourcinggithub,项目名称:outsourcing,代码行数:8,代码来源:filter.php


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