当前位置: 首页>>代码示例>>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;未经允许,请勿转载。