当前位置: 首页>>代码示例>>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;未经允许,请勿转载。