当前位置: 首页>>代码示例>>PHP>>正文


PHP Controller_Template::__construct方法代码示例

本文整理汇总了PHP中Controller_Template::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Controller_Template::__construct方法的具体用法?PHP Controller_Template::__construct怎么用?PHP Controller_Template::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Controller_Template的用法示例。


在下文中一共展示了Controller_Template::__construct方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($request, $response)
 {
     $this->info = new AdminInfo();
     $this->translator = FrontHelper::getTranslation();
     View::set_global('translator', $this->translator);
     parent::__construct($request, $response);
 }
开发者ID:xiaoguizhidao,项目名称:ortodon,代码行数:7,代码来源:Coins.php

示例2: __construct

 public function __construct(Request $request)
 {
     if (Request::$is_ajax) {
         $this->profiler = NULL;
         $this->auto_render = FALSE;
     }
     $this->session = Session::instance();
     parent::__construct($request);
 }
开发者ID:ryross,项目名称:kobase,代码行数:9,代码来源:base.php

示例3: __construct

 public function __construct($request)
 {
     parent::__construct($request);
     $this->template = View::factory('hmo_masterpage');
     $config = Kohana_Config::instance()->load("config");
     $this->site = $config['app_path'];
     $this->session = Session::instance();
     if ($this->authenticate) {
         $this->authenticate();
     }
     $this->message = I18n::load('en-us');
 }
开发者ID:samjiks,项目名称:semedng,代码行数:12,代码来源:ccontroller.php

示例4: __construct

 public function __construct(Request $request)
 {
     parent::__construct($request);
     if (!Kohana::config('shindig.use_authentication')) {
         // Redirect to the home page
         $this->request->redirect('');
     }
     if ($user = Cookie::get('authorized')) {
         $user = Sprig::factory('user', array('username' => $user))->load();
         if ($user->loaded()) {
             // User is logged in
             $this->user = $user;
             Shindig::$has_auth = TRUE;
         }
     }
     if (!$this->user) {
         // Force the user to login
         $this->request->action = 'login';
     }
 }
开发者ID:kerkness,项目名称:shindig,代码行数:20,代码来源:admin.php

示例5: __construct

 public function __construct(Request $request, Response $response)
 {
     parent::__construct($request, $response);
     if (!isset($_COOKIE['cms_milestone_language'])) {
         setcookie('cms_milestone_language', I18n::lang(), time() + 60 * 60 * 24 * 30);
     }
     if (isset($_POST['language_website'])) {
         setcookie('cms_milestone_language', $this->request->post('language_website'), time() + 60 * 60 * 24 * 30);
         $new_adress = $this->request->post('language_website') . substr($this->request->uri(), strpos($this->request->uri(), '/'));
         HTTP::redirect(URL::site($new_adress, TRUE), 302);
     }
     if (!$this->request->param('language')) {
         print_r($_COOKIE);
         if (isset($_COOKIE['cms_milestone_language'])) {
             HTTP::redirect($_COOKIE['cms_milestone_language'] . '/' . $this->request->uri(), 302);
         } else {
             HTTP::redirect(I18n::lang() . '/' . $this->request->uri(), 302);
         }
     }
     I18n::lang($this->request->param('language'));
     $this->_session = Session::instance();
     $this->_auth = Auth::instance();
     /*
     if( !empty( $_COOKIE['cms_lang'] ) )
     {
     	if( isset( $_POST['cms_lang'] ) )
     	{
             		I18n::lang($_POST['cms_lang']);
     		setcookie( 'cms_lang', $_POST['cms_lang'], time()+(60*60*24*30) );
     		HTTP::redirect( $_SERVER['REQUEST_URI'] );
     	}
     }
     else 
     {
     	I18n::lang('pl-pl');
     	setcookie( 'cms_lang', 'pl-pl', time()+(60*60*24*30) );
     }
     */
 }
开发者ID:rafalkowalski2,项目名称:cmsmilestone,代码行数:39,代码来源:AdminTemplate.php

示例6: __construct

 public function __construct($request)
 {
     $session = Session::instance();
     $mobile = $session->get('mobile');
     if (isset($_REQUEST['mobile'])) {
         $mobile = true == $_REQUEST['mobile'];
     }
     if (is_null($mobile)) {
         $ua = $_SERVER['HTTP_USER_AGENT'];
         $matches = array('/iPhone/i', '/iPod/i', '/iPad/i');
         $mobile = false;
         foreach ($matches as $match) {
             if (preg_match($match, $ua)) {
                 $mobile = true;
                 break;
             }
         }
     }
     $session->set('mobile', $mobile);
     if ($mobile) {
         $this->template = 'mobile';
     }
     parent::__construct($request);
 }
开发者ID:jmhobbs,项目名称:Sanity,代码行数:24,代码来源:site.php

示例7:

 function __construct(Request $request)
 {
     parent::__construct($request);
 }
开发者ID:BGCX261,项目名称:zinventory-svn-to-git,代码行数:4,代码来源:privatezone.php

示例8:

 function __construct($request, $response)
 {
     parent::__construct($request, $response);
 }
开发者ID:stellio,项目名称:vTrack,代码行数:4,代码来源:DefaultTemplate.php

示例9: __construct

 public function __construct(Kohana_request $request)
 {
     parent::__construct($request);
 }
开发者ID:rafsoaken,项目名称:kohana-rss,代码行数:4,代码来源:feed.php

示例10: __construct

 public function __construct(\Request $request, \Response $response)
 {
     $this->force_this_main_template = 'blank';
     parent::__construct($request, $response);
 }
开发者ID:Workhaven,项目名称:workhaven,代码行数:5,代码来源:Lostpassword.php

示例11: __construct

 /**
  * Default class construct
  */
 public function __construct($request, $response)
 {
     $this->config = Kohana::$config->load('application');
     parent::__construct($request, $response);
 }
开发者ID:hbarroso,项目名称:Goworkat,代码行数:8,代码来源:base.php


注:本文中的Controller_Template::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。