當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AppController::__construct方法代碼示例

本文整理匯總了PHP中App\Controller\AppController::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP AppController::__construct方法的具體用法?PHP AppController::__construct怎麽用?PHP AppController::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在App\Controller\AppController的用法示例。


在下文中一共展示了AppController::__construct方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct(\Cake\Network\Request $request = null, \Cake\Network\Response $response = null, $name = null, $eventManager = null, $components = null)
 {
     parent::__construct($request, $response, $name, $eventManager, $components);
     $this->set('title', 'Caixa Movimentos');
     $this->set('bt_consultar_acao', false);
     $this->set('bt_cadastrar_acao', false);
     $this->set('bt_excluir_acao', false);
 }
開發者ID:lucasnpinheiro,項目名稱:Kiterp,代碼行數:8,代碼來源:CaixasMovimentosController.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $app = App::getInstance();
     $auth = new DBAuth($app->getDb());
     if (!$auth->logged()) {
         $this->forbidden();
     }
 }
開發者ID:LoRayZm,項目名稱:portfolio2,代碼行數:9,代碼來源:AppController.php

示例3: __construct

 public function __construct(\Core\Request $request, \Core\Session $session, \Core\Auth $auth)
 {
     parent::__construct($request, $session, $auth);
     $this->layout = 'painel';
     $this->set('titulo', 'Título não Informado');
     if (!$this->Auth->check()) {
         $this->redirect('/home/logout');
     }
 }
開發者ID:lucasnpinheiro,項目名稱:Aulas,代碼行數:9,代碼來源:PainelAppController.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $app = App::getInstance();
     $auth = new DBAuth($app->getDb());
     if (!$auth->logged()) {
         $this->forbidden();
     }
     /*$logged = false;
       $this->render('templates.default', compact('logged'));*/
 }
開發者ID:nayed,項目名稱:bloggy,代碼行數:11,代碼來源:AppController.php

示例5: __construct

 /**
  * Constructor
  *
  * @param \Cake\Network\Request|null $request Request instance.
  * @param \Cake\Network\Response|null $response Response instance.
  */
 public function __construct($request = null, $response = null)
 {
     parent::__construct($request, $response);
     if (count(Router::extensions()) && !isset($this->RequestHandler)) {
         $this->loadComponent('RequestHandler');
     }
     $eventManager = $this->eventManager();
     if (isset($this->Auth)) {
         $eventManager->off($this->Auth);
     }
     if (isset($this->Security)) {
         $eventManager->off($this->Security);
     }
 }
開發者ID:m-esprit,項目名稱:web-app,代碼行數:20,代碼來源:ErrorController.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->loadModel('Post');
     $this->loadModel('Category');
 }
開發者ID:LoRayZm,項目名稱:portfolio2,代碼行數:6,代碼來源:PostController.php

示例7: __construct

 public function __construct(\Cake\Network\Request $request = null, \Cake\Network\Response $response = null, $name = null, $eventManager = null, $components = null)
 {
     parent::__construct($request, $response, $name, $eventManager, $components);
     $this->set('title', 'Grupos');
 }
開發者ID:lucasnpinheiro,項目名稱:Kiterp,代碼行數:5,代碼來源:GruposController.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     $this->loadModel('Actuality');
 }
開發者ID:YitzakD,項目名稱:Ivoirepraise,代碼行數:5,代碼來源:ActusController.php

示例9: __construct

 public function __construct(\Cake\Network\Request $request = null, \Cake\Network\Response $response = null, $name = null, $eventManager = null, $components = null)
 {
     parent::__construct($request, $response, $name, $eventManager, $components);
     $this->set('title', 'Vendedores');
     $this->loadModel('Pessoas');
 }
開發者ID:lucasnpinheiro,項目名稱:Kiterp,代碼行數:6,代碼來源:VendedoresController.php

示例10: __construct

 public function __construct(\Core\Request $request, \Core\Session $session, \Core\Auth $auth)
 {
     parent::__construct($request, $session, $auth);
     $this->loadModel('Produtos');
 }
開發者ID:lucasnpinheiro,項目名稱:Aulas,代碼行數:5,代碼來源:ProdutosController.php

示例11: __construct

 public function __construct(\Cake\Network\Request $request = null, \Cake\Network\Response $response = null, $name = null, $eventManager = null, $components = null)
 {
     parent::__construct($request, $response, $name, $eventManager, $components);
     $this->set(['menu' => $this->menu, 'currentPageName' => $this->request->here]);
 }
開發者ID:LPFP,項目名稱:donjon,代碼行數:5,代碼來源:PagesController.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     $this->loadModel(['Users', 'Posts']);
 }
開發者ID:NuBOXDevCom,項目名稱:frambox,代碼行數:5,代碼來源:TestController.php

示例13: __construct

 public function __construct(\Cake\Network\Request $request = null, \Cake\Network\Response $response = null, $name = null, $eventManager = null)
 {
     parent::__construct($request, $response, $name, $eventManager);
     debug('thing');
 }
開發者ID:OrigamiStructures,項目名稱:sampleblog,代碼行數:5,代碼來源:AppController.php


注:本文中的App\Controller\AppController::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。