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


PHP Renderer::getInstance方法代碼示例

本文整理匯總了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');
 }
開發者ID:jwest00724,項目名稱:mambo,代碼行數:7,代碼來源:admin.languages.class.php

示例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);
     }
 }
開發者ID:kaz6120,項目名稱:BitWiki,代碼行數:30,代碼來源:BitWiki.php

示例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);
開發者ID:jwest00724,項目名稱:mambo,代碼行數:31,代碼來源:admin.languages.php

示例4: render

 public function render()
 {
     $renderer = Renderer::getInstance('/view/eve/test/form');
     $variables = array('form' => $this);
     return $renderer->render($variables, 'form');
 }
開發者ID:kidaa,項目名稱:evedata,代碼行數:6,代碼來源:Form.php

示例5: home

 public function home()
 {
     $renderer = Renderer::getInstance();
     $renderer->renderPage("home");
 }
開發者ID:andou,項目名稱:wed,代碼行數:5,代碼來源:App.php


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