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


PHP Render::__construct方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     try {
         //rendereiza o construtor da classe pai
         $empresasRelacionadas = array();
         parent::__construct();
         $this->empresas_id = Session::read('Empresa.empresas_id');
         /* PEGAR O ID DA EMPRESA NA SEÇÃO */
         $this->pessoas_id = Session::read('Usuario.pessoas_id');
         /* PEGAR O ID DA EMPRESA NA SEÇÃO */
         $this->css = array('css/bootstrap', 'bs3/css/bootstrap.min', 'css/bootstrap_papper', 'css/bootstrap-reset', 'font-awesome/css/font-awesome', 'css/style', 'css/style-responsive', 'css/custom', 'js/advanced-datatable/css/demo_page', 'js/advanced-datatable/css/demo_table', 'css/Icomoon/style', 'css/preloader', 'js/data-tables/DT_bootstrap', 'js/bootsAlert/css/bootsAlert', 'js/chosen/chosen');
         $this->js = array('js/jquery-1.11.1.min', 'bs3/js/bootstrap.min', 'js/jquery-ui-1.9.2.custom.min', 'js/ajaxForm', 'js/ckeditor/ckeditor', 'js/jquery.scrollTo.min', 'js/jQuery-slimScroll-1.3.0/jquery.slimscroll', 'js/jquery.nicescroll', 'js/dashboard', 'js/sparkline/jquery.sparkline', 'js/advanced-datatable/js/jquery.dataTables.min', 'js/advanced-datatable/js/dataTables.bootstrap.min', 'js/advanced-datatable/js/dataTables.responsive.min', 'js/dynamic_table_init', 'js/jquery.mask.min', 'js/funcoes', 'js/permission_js', 'js/scripts', 'js/bootsAlert/js/bootsAlert', 'js/chosen/chosen.jquery.min');
         $this->ACL = new ACL();
         $this->Util = new Utils();
         $this->Empresa = new Empresa();
         /**
          * definindo a data hora local
          */
         date_default_timezone_set('America/Sao_Paulo');
         if (!in_array($this->view, $this->ClasseAllow)) {
             if (Session::check('Auth') && Session::check('Usuario')) {
                 if ($this->ACL->authenticacaoUser($this->controller, $this->view, Session::read('Usuario.roles_id'))) {
                     Session::isLogged();
                 } else {
                     //verifica se é um metodo ou pagina
                     if ($this->autoRender == true) {
                         throw new PageException("Pagina {$this->view}.php não encontrada", 405);
                     }
                 }
             } else {
                 //logica para o usuario publico
                 if ($this->ACL->authenticacaoUser($this->controller, $this->view, 1)) {
                     //header('Location: ' . Router::url() . 'Erros/areaRestrita' );
                 } else {
                     //verifica se é um metodo ou pagina
                     if ($this->autoRender) {
                         //redireciona para a pagina de area restrita
                         throw new PageException("Pagina {$this->view}.php não encontrada", 405);
                     }
                 }
             }
         }
         /**
          * variaveis pora todas as areas do sistema
          */
         if (in_array(Session::read('Usuario.roles_id'), array(3, 4))) {
             $empresasRelacionadas = $this->Empresa->empresasRelacionadas(md5($this->pessoas_id), Session::read('Usuario.roles_id'));
         }
         $this->set('empresasRelacionadas', $empresasRelacionadas);
         $this->set('css', $this->css);
     } catch (PageException $ex) {
         echo $ex->pageNotFound();
         exit;
     } catch (Exception $ex) {
         echo $ex->getTraceAsString();
     }
 }
开发者ID:brunoblauzius,项目名称:sistema,代码行数:57,代码来源:AppController.php

示例2:

 function __construct($view, $data = [], $layout = null)
 {
     parent::__construct($view, $data);
     if ($layout == null) {
         $this->layout = SiteBuilder::$app->layout;
     } else {
         $this->layout = $layout;
     }
 }
开发者ID:serrg1994,项目名称:SBFramework,代码行数:9,代码来源:LayoutRender.php

示例3: __construct

 public function __construct($if, $viewFile, $data = NULL)
 {
     parent::__construct($viewFile, $data);
     $this->_if = $if;
 }
开发者ID:4app,项目名称:zuniphp,代码行数:5,代码来源:RenderIf.php

示例4: __construct

 public function __construct($fileView, $dataArrAssoc = NULL)
 {
     parent::__construct($fileView, $dataArrAssoc);
 }
开发者ID:4app,项目名称:zuniphp,代码行数:4,代码来源:RenderStr.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->Controll($this->controller);
 }
开发者ID:brunoblauzius,项目名称:sistema,代码行数:5,代码来源:Router.php

示例6: __construct

 /**
  * Constructor, load parent constructor
  */
 protected function __construct()
 {
     parent::__construct();
 }
开发者ID:sybrew,项目名称:the-seo-framework,代码行数:7,代码来源:detect.class.php


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