本文整理汇总了PHP中Renderer::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Renderer::getInstance方法的具体用法?PHP Renderer::getInstance怎么用?PHP Renderer::getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Renderer
的用法示例。
在下文中一共展示了Renderer::getInstance方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Controller
function Controller($name)
{
$this->name = $name;
$this->request =& Request::getInstance($name);
$this->renderer =& Renderer::getInstance();
$this->renderer->setdir(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'templates');
}
示例2: run
/**
* Run application
*/
public function run()
{
try {
// Pre settings before run controller
foreach (Command::getCommands() as $cmd) {
$cmd->doing();
}
foreach (Plugin::getPlugins() as $plugin) {
$plugin->doing();
}
// Run the controller
$ret = $this->controller->run();
// After run the controller
foreach (Command::getCommands() as $cmd) {
$cmd->done();
}
foreach (Plugin::getPlugins() as $plugin) {
$plugin->done();
}
// Rendering
Renderer::getInstance()->render($ret);
} catch (MyException $exc) {
$text['title'] = 'error';
$text['body'] = $exc->getMessage();
Renderer::getInstance()->render($text);
}
}
示例3: mosRedirect
mosRedirect('index2.php', T_('You are not authorized to view this resource.'));
}
require_once mamboCore::get('rootPath') . '/includes/phpgettext/error.php';
require_once mamboCore::get('rootPath') . '/includes/phpgettext/phpgettext.catalog.php';
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'admin.languages.class.php';
$include_path = ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . dirname(__FILE__));
$request =& Request::getInstance('com_languages');
$session =& $request->session();
if (isset($session['mosmsg'])) {
$request->set('mosmsg', $session['mosmsg']);
unset($session['mosmsg']);
}
$lang = $session['lang'] = mosGetParam($_POST, 'lang', isset($session['lang']) ? $session['lang'] : mamboCore::get('mosConfig_locale'));
$mamboLanguage =& new mamboLanguage($lang);
$languages = $mamboLanguage->getLanguages();
$task = mosGetParam($_REQUEST, 'task', 'index');
$act = mosGetParam($_REQUEST, 'act', 'language');
$search = trim(mosGetParam($_POST, 'search', ''));
$request->set('task', $task);
$request->set('act', $act);
$request->set('lang', $lang);
$request->set('languages', $languages);
$request->set('search', $search);
$renderer =& Renderer::getInstance();
foreach ($request->get() as $key => $value) {
$renderer->addvar($key, $value);
}
$controller = new Controller('com_languages');
$controller->forward($task);
ini_set('include_path', $include_path);
#dump($_REQUEST);
示例4: render
public function render()
{
$renderer = Renderer::getInstance('/view/eve/test/form');
$variables = array('form' => $this);
return $renderer->render($variables, 'form');
}
示例5: home
public function home()
{
$renderer = Renderer::getInstance();
$renderer->renderPage("home");
}