本文整理汇总了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);
}
示例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());
}
示例3: GetCaptionByName
private function GetCaptionByName($name)
{
$result = eval('global $c' . $name . '; return $c' . $name . ';');
return StringUtils::ConvertTextToEncoding($result, 'UTF-8', $this->pageEncoding);
}
示例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);
}