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