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


PHP BaseController::__construct方法代码示例

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


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

示例1: __construct

 /**
  * construct function
  */
 public function __construct($controller, $action)
 {
     parent::__construct($controller, $action);
     $um = new UserModel();
     $this->user = $um->loadUser();
     $this->setView('curUser', $this->user);
 }
开发者ID:guojianing,项目名称:dagger2,代码行数:10,代码来源:MyController.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->instagramModel = new \blogg\model\instagram\InstagramModel($this->settings->getInstagramSettings());
     $this->setView(new \blogg\view\instagram\InstagramView());
     $this->numberOfImages = $this->settings->getInstagramSettings()->numberOfImages;
 }
开发者ID:al223ec,项目名称:al223ecProjekt,代码行数:7,代码来源:instagram_controller.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->check_session();
     $this->controllerName = "PuntosVenta";
     $this->load->model('common_model');
 }
开发者ID:jgarceso,项目名称:convivir,代码行数:7,代码来源:PuntosVenta.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     if (!BEUsersHelper::isAdmin()) {
         Redirect::to('/');
     }
 }
开发者ID:huuson94,项目名称:btlltct,代码行数:7,代码来源:BEBaseController.php

示例5: __construct

 public function __construct(PaymentRepository $paymentRepo, InvoiceRepository $invoiceRepo, AccountRepository $accountRepo)
 {
     parent::__construct();
     $this->paymentRepo = $paymentRepo;
     $this->invoiceRepo = $invoiceRepo;
     $this->accountRepo = $accountRepo;
 }
开发者ID:poseidonjm,项目名称:invoice-ninja,代码行数:7,代码来源:PaymentController.php

示例6: __construct

 public function __construct(AccountRepository $accountRepo, ContactMailer $contactMailer, UserMailer $userMailer)
 {
     parent::__construct();
     $this->accountRepo = $accountRepo;
     $this->contactMailer = $contactMailer;
     $this->userMailer = $userMailer;
 }
开发者ID:aleguisf,项目名称:fvdev1,代码行数:7,代码来源:UserController.php

示例7: __construct

 /**
  * FlightsController constructor.
  */
 public function __construct()
 {
     parent::__construct('Flight');
     /* Template & Navbar par default */
     $this->dsp->template = 'layouts.templates.manager';
     return true;
 }
开发者ID:birdiebel,项目名称:G2016,代码行数:10,代码来源:FlightsController.php

示例8: __construct

 public function __construct($request, $response)
 {
     /*{{{*/
     parent::__construct($request, $response);
     $response->module = Space::MODULE_THREAD;
     $response->unDisplaySubMenu = true;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:7,代码来源:flowcontroller.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->seo_set();
     $this->docModel = M('Document');
     $this->model = D('Store');
 }
开发者ID:noikiy,项目名称:wakeup,代码行数:7,代码来源:CityController.class.php

示例10: __construct

 public function __construct(Vocabulary $vocabulary)
 {
     parent::__construct();
     $this->vocabulary = $vocabulary;
     $this->route_prefix = rtrim(Config::get('taxonomy::route_prefix'), '.') . '.';
     View::composer('taxonomy::*', 'Devfactory\\Taxonomy\\Composers\\TaxonomyComposer');
 }
开发者ID:SerdarSanri,项目名称:taxonomy-laravel-bundle,代码行数:7,代码来源:TaxonomyController.php

示例11: __construct

 /**
  * Create a new API User controller.
  *
  * @param UserRepositoryInterface $users
  *
  * @return ApiUserController
  */
 public function __construct(UserRepositoryInterface $users)
 {
     parent::__construct();
     $this->users = $users;
     $this->beforeFilter('auth');
     $this->beforeFilter('csrf_header', array('only' => array('store', 'update', 'destroy')));
 }
开发者ID:samimohs,项目名称:wardrobe,代码行数:14,代码来源:UserController.php

示例12: __construct

 public function __construct(IRetailerRepository $retailer)
 {
     parent::__construct();
     $this->adminId = Auth::id();
     $this->address = new Address();
     $this->retailer = $retailer;
 }
开发者ID:EricBui0512,项目名称:FYP,代码行数:7,代码来源:RetailersController.php

示例13: __construct

 public function __construct($id, $module = null)
 {
     parent::__construct($id, $module);
     // If there is a post-request, redirect the application to the provided url of the selected language
     if (isset($_POST['language'])) {
         $lang = $_POST['language'];
         $MultilangReturnUrl = $_POST[$lang];
         $this->redirect($MultilangReturnUrl);
     }
     // Set the application language if provided by GET, session or cookie
     if (isset($_GET['language'])) {
         Yii::app()->language = $_GET['language'];
         Yii::app()->user->setState('language', $_GET['language']);
         $cookie = new CHttpCookie('language', $_GET['language']);
         $cookie->expire = time() + 60 * 60 * 24 * 365;
         // (1 year)
         Yii::app()->request->cookies['language'] = $cookie;
         $_COOKIE['language'] = Yii::app()->request->cookies['language']->value;
     } else {
         if (Yii::app()->user->hasState('language')) {
             Yii::app()->language = Yii::app()->user->getState('language');
         } else {
             if (isset(Yii::app()->request->cookies['language'])) {
                 Yii::app()->language = Yii::app()->request->cookies['language']->value;
             }
         }
     }
     if ($_POST['server']) {
         $url = str_ireplace($_COOKIE['server'], $_POST['server'], Yii::app()->request->requestUri);
         Yii::app()->request->cookies['server'] = new CHttpCookie('server', strtolower($_POST['server']));
         $this->redirect($url);
     }
 }
开发者ID:smokeelow,项目名称:faicore,代码行数:33,代码来源:BackEndController.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->model('admin/info_model');
     $this->lang->load('common', $this->session->userdata('lang_file'));
     $this->siteTitle = 'Account Soft | ';
 }
开发者ID:taherbth,项目名称:b-invoice,代码行数:7,代码来源:home.php

示例15:

 function __construct()
 {
     parent::__construct();
     $this->data['layout'] = 'adminhtml';
     $this->data['header'] = 'Data Jurnal Mahasiswa';
     //$this->helper('Data');
 }
开发者ID:novayadi85,项目名称:CBR,代码行数:7,代码来源:Jurnal.php


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