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