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


PHP Viewer::setLanguageID方法代碼示例

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


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

示例1: Viewer

require 'page_SeriesEdit.php';
require 'app_tvAddicts.php';
//
// Because an AppController object is not able to function on it's own
// this script will properly load it and drive it through the
// load, process, display phases.
//
// This script acts like the Page Object, which you will learn about later.
//
// Common data sent to the PageContent object
$db = new Database_Site(SITE_DB_NAME, SITE_DB_PATH, SITE_DB_USER, SITE_DB_PWORD);
$viewer = new Viewer();
// if a language option was set, then update viewer to that language
$pLang = '';
if (isset($_REQUEST[Page::QS_LANGUAGE])) {
    $viewer->setLanguageID($_REQUEST[Page::QS_LANGUAGE]);
    $pLang = '&' . Page::QS_LANGUAGE . '=' . $_REQUEST[Page::QS_LANGUAGE];
}
$callBack = 'ex_tvAddicts_obj.php?' . Page::QS_MODULE . '=Something' . $pLang;
$labels = new XMLObject_MultilingualManager($viewer->getLanguageID());
// Create new AppController Object
$application = new moduleTVAddicts($db, $viewer, $labels);
$application->setModuleRootPath('');
$application->setPageCallBack($callBack);
$application->setBaseCallBack($callBack);
// "Drive" the PageContent Object through it's loadData(), processData(), and
// prepareDisplayData() functions.
$application->loadData();
$application->processData();
$application->prepareDisplayData();
// Get the content data back in Array format
開發者ID:andrewroth,項目名稱:c4c_intranet,代碼行數:31,代碼來源:ex_tvAddicts_obj.php


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