本文整理汇总了PHP中Main::getDict方法的典型用法代码示例。如果您正苦于以下问题:PHP Main::getDict方法的具体用法?PHP Main::getDict怎么用?PHP Main::getDict使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Main
的用法示例。
在下文中一共展示了Main::getDict方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
/**
* @param Main $main
*/
public function execute($main)
{
$crService = new Default_Service_CombatReport($main);
if ($main->getValidator()->isValid() && $main->getValidator()->isValidated()) {
try {
$settings = $crService->getSettings();
$report = $crService->getReport();
$renderer = $crService->getRenderer($settings, $report);
$renderedReport = $renderer->renderReport();
$renderedTitle = $renderer->renderTitle();
$renderedPreview = Default_Renderer_Helper::parseBBCode($renderedReport);
$main->getStore()->set('result-content', $renderedReport);
$main->getStore()->set('result-title', $renderedTitle);
$main->getStore()->set('result-preview', $renderedPreview);
} catch (Exception $e) {
//Debug::arr( $e );
$main->addInfo(new Info($main->getDict()->getVal('Bad Cr'), Info::ERROR));
$main->getStore()->set('error', true);
}
}
}
示例2: getDict
/**
* @return Dictionary
*/
public function getDict()
{
return $this->main->getDict();
}
示例3: getDefaultSettings
/**
* Get the default settings
*
* @return array
*/
public function getDefaultSettings()
{
return array('theme' => 'kokx', 'middle_text' => $this->_main->getDict()->getVal('After the battle...'), 'hide_time' => true, 'merge_fleets' => true, 'advanced_summary' => false, 'harvest_spoiler' => false, 'lang' => 'nl');
}
示例4: FormManager
$main->setFormManager(new FormManager());
//Connect form manager
$main->setDict(new Dictionary());
//Connect dictionary
$main->setStore(new Store());
//Connect Store
$main->handleGet();
//Handle $_GET
$main->handleDictionary();
//Handle Dictionary
$main->handlePost();
//Handle $_POST
$main->handleModule('KokxModule');
//Name of module class
$main->addGoogleAnalytics('UA-46271379-4');
$main->addInfo(new Info($main->getDict()->getVal('OGotcha release'), Info::INFORMATION));
/**
* Handle View
*/
$view = new View($main);
//Create view
$view->addCSS('main.css');
//Add style
$renderd = $view->render();
//Render content
echo $renderd;
//Dispay content
/*
* http://pastebin.com/Fg1uhvU4 - Dutch
* http://pastebin.com/1xzDcJm4 - English
* http://pastebin.com/gT7PFkxK - English