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


PHP base_controller::__construct方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $user = M('User')->getUserById($this->user_session['uid']);
     $user['last_ip'] = long2ip($user['last_ip']);
     $this->assign('user', $user);
 }
开发者ID:fkssei,项目名称:pigcms10,代码行数:7,代码来源:account_controller.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     if (empty($this->store_session)) {
         json_return(999, '会话超时,请刷新页面重试');
     }
 }
开发者ID:fkssei,项目名称:pigcms10,代码行数:7,代码来源:attachment_controller.php

示例3: foreach

 function __construct(&$app)
 {
     parent::__construct($app);
     if (@constant('WITHOUT_STRIP_HTML')) {
         $this->enable_strip_whitespace = false;
     }
     $this->app = $app;
     $this->_request = kernel::single('base_component_request');
     $this->_response = kernel::single('base_component_response');
     foreach (kernel::serviceList('site_controller_construct') as $service) {
         $service->prepare($this);
     }
     //构造时加载
     //finish modify controler-action html
     foreach (kernel::serviceList(sprintf('site_controller_content.%s.%s.%s', $this->_request->get_app_name(), $this->_request->get_ctl_name(), $this->_request->get_act_name())) as $class_name => $service) {
         if ($service instanceof site_interface_controller_content) {
             if (method_exists($service, 'modify')) {
                 $this->__finish_modifier[$class_name] = $service;
             }
             if (method_exists($service, 'boot')) {
                 $service->boot($this);
             }
         }
     }
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:25,代码来源:controller.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     if (!$this->user) {
         die("Members only. <a href='/users/login'>Please login</a>");
     }
 }
开发者ID:rebekahheacock,项目名称:dwa15-archive,代码行数:7,代码来源:c_posts.php

示例5: __construct

 public function __construct($_vars)
 {
     parent::__construct();
     var_dump($_vars);
     var_dump($this->get_app_path());
     var_dump($this->get_base_url());
 }
开发者ID:maxik001,项目名称:fwork,代码行数:7,代码来源:page_not_exists.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->contactModel = F::load_model('contact');
     $this->userModel = F::load_model('user');
     $this->tagModel = F::load_model('tag');
 }
开发者ID:NASH-WORK,项目名称:NASH-CRM,代码行数:7,代码来源:contact_controller.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     if (empty($this->store_session)) {
         redirect(url('index:index'));
     }
 }
开发者ID:fkssei,项目名称:pigcms10,代码行数:7,代码来源:goods_controller.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     # Make sure user is logged in if they want to use anything in this controller
     if (!$this->user) {
         die("Members only. <a href='/users/login'>Login</a>");
     }
 }
开发者ID:nvarney,项目名称:dwa,代码行数:8,代码来源:c_posts.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->model('system_model');
     $this->_compID = $this->session->userdata('compID');
     date_default_timezone_set("Asia/Manila");
     $this->_datetime = date('Y-m-d H:i:s');
 }
开发者ID:kirkmicz,项目名称:iSMS,代码行数:8,代码来源:company_controller.php

示例10: __construct

 /**
  * 构造函数
  *
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->userModel = F::load_model('user');
     $this->tagModel = F::load_model('tag');
     $this->photoTool = F::loadClass('photo');
     $this->contactModel = F::load_model('contact', array());
 }
开发者ID:NASH-WORK,项目名称:NASH-CRM,代码行数:14,代码来源:user_controller.php

示例11: __construct

 public function __construct($r = array())
 {
     $this->allowed_methods = array('views');
     if (lib::client_is_internal_host()) {
         $this->allowed_methods[] = 'views_demo';
     }
     parent::__construct($r);
 }
开发者ID:robertosciarra,项目名称:vanilla-mvc,代码行数:8,代码来源:media.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     #Specific css is added to an array which already has one element from the parent constructor method.
     #$this->$client_files[] = "/css/users.css"; # doesn't work so I use the following array_push invocation instead
     #array_push($this->client_files, "/css/users.css"); # this works
     #$this->template->client_files = Utils::load_client_files($this->client_files);
 }
开发者ID:rtizard,项目名称:dwa,代码行数:8,代码来源:c_data.php

示例13: foreach

 function __construct(&$app)
 {
     parent::__construct($app);
     $helper = kernel::single('base_view_helper');
     foreach (get_class_methods($helper) as $method) {
         $this->_compiler()->set_view_helper($method, 'base_view_helper');
     }
 }
开发者ID:syjzwjj,项目名称:quyeba,代码行数:8,代码来源:controller.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     # Make sure user is logged in if they want to use anything in this controller
     if (!$this->user) {
         #die("Members only. <a href='/users/login'>Login</a>");
         Router::redirect("/users/login/Please login first.");
     }
 }
开发者ID:nvarney,项目名称:dwa_prod,代码行数:9,代码来源:c_posts.php

示例15: __construct

 public function __construct()
 {
     parent::__construct();
     $this->syncModel = F::load_model('sync', array());
     #请求权限检查
     $this->params = $this->require_params(array('token'));
     if ($this->params['token'] != self::TOKEN) {
         throw new Exception('无效的授权信息', 100);
     }
 }
开发者ID:NASH-WORK,项目名称:NASH-CRM,代码行数:10,代码来源:sync_controller.php


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