當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。