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


PHP view::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($l, $c, $d = null)
 {
     parent::__construct($l, $c, $d);
     if (!empty($d['FINISH_TEST']['if']) && $d['FINISH_TEST']['if'] == 1) {
         $this->content = preg_replace("/{TEST_GO_INFO}[\\s\\S]*{TEST_GO_INFO_END}/Ui", '', $this->content);
         $this->content = preg_replace("/{TEST_FINISH_INFO}/Ui", '', $this->content);
         $this->content = preg_replace("/{TEST_FINISH_INFO_END}/Ui", '', $this->content);
         $this->content = preg_replace("/{PROC}/Ui", $d['FINISH_TEST']['th_proc'] . '%', $this->content);
         if ($d['FINISH_TEST']['th_result'] == 1) {
             $this->content = preg_replace("/{RESULT}/Ui", '{LABEL="test_res_good"}', $this->content);
         } else {
             $this->content = preg_replace("/{RESULT}/Ui", '{LABEL="test_res_bad"}', $this->content);
         }
     } else {
         $this->content = preg_replace("/{TEST_FINISH_INFO}[\\s\\S]*{TEST_FINISH_INFO_END}/Ui", '', $this->content);
         $this->content = preg_replace("/{TEST_GO_INFO}/Ui", '', $this->content);
         $this->content = preg_replace("/{TEST_GO_INFO_END}/Ui", '', $this->content);
         $type = (int) $d['now']['quest']['id_question_type'];
         $dop = file_get_contents('tpl/test_type_' . $type . '.tpl');
         $this->content = preg_replace("/{Q_MESSTYPE}/Ui", 'test_type_' . $type, $this->content);
         $this->content = preg_replace("/{Q_TEXT}/Ui", $d['now']['quest']['q_text'], $this->content);
         $cont = null;
         foreach ($d['now']['answers'] as $ans) {
             $temp = $dop;
             $temp = preg_replace("/{ANS_ID}/Ui", $ans['id_answer'], $temp);
             $temp = preg_replace("/{ANS_VALUE}/Ui", $ans['a_text'], $temp);
             $cont .= $temp;
         }
         $this->content = preg_replace("/{Q_ANS}/Ui", $cont, $this->content);
     }
 }
开发者ID:allok,项目名称:PhpTS,代码行数:31,代码来源:v_test_start.php

示例2: __construct

 public function __construct($l, $c, $d = null)
 {
     parent::__construct($l, $c, $d);
     $dop = file_get_contents('tpl/part_categ.tpl');
     $this->content = preg_replace("/{CATEGORY}/Ui", $dop, $this->content);
     $this->content = preg_replace("/{CAT_ITEM}/Ui", $d['category'], $this->content);
 }
开发者ID:allok,项目名称:PhpTS,代码行数:7,代码来源:v_admin_addtest.php

示例3: __construct

 public function __construct($l, $c, $d = null)
 {
     parent::__construct($l, $c, $d);
     if ($d['user_login'] === false) {
         $this->content = preg_replace("/{LOGININFO_START}/Ui", '', $this->content);
         $this->content = preg_replace("/{LOGININFO_END}/Ui", '', $this->content);
     } else {
         $this->content = preg_replace("/{LOGININFO_START}[\\s\\S]*{LOGININFO_END}/Ui", '', $this->content);
     }
     $dop = file_get_contents('tpl/main_info.tpl');
     //$t_spec = '<span class="label label-warning">{LABEL="test_spec"}</span>';
     //$t_free = '<span class="label label-default">{LABEL="test_free"}</span>';
     $cont = null;
     foreach ($d['tests'] as $ts) {
         $temp = $dop;
         if (!empty($ts['t_allow_guest'])) {
             $temp = preg_replace("/{SPEC_START}[\\s\\S]*{SPEC_END}/Ui", '', $temp);
             $temp = preg_replace("/{FREE_START}/Ui", '', $temp);
             $temp = preg_replace("/{FREE_END}/Ui", '', $temp);
         } else {
             $temp = preg_replace("/{FREE_START}[\\s\\S]*{FREE_END}/Ui", '', $temp);
             $temp = preg_replace("/{SPEC_START}/Ui", '', $temp);
             $temp = preg_replace("/{SPEC_END}/Ui", '', $temp);
         }
         $temp = preg_replace("/{TEST_NAME}/Ui", $ts['t_test_name'], $temp);
         $temp = preg_replace("/{TEST_ID}/Ui", $ts['id_test'], $temp);
         $cont .= $temp;
     }
     $this->content = preg_replace("/{TEST_GO}/Ui", $cont, $this->content);
     //{TEST_GO}
     //{SPEC_START}<span class="label label-warning">{LABEL="test_spec"}</span>{SPEC_END}
     //  {FREE_START}<span class="label label-default">{LABEL="test_free"}</span>{FREE_END}
 }
开发者ID:allok,项目名称:PhpTS,代码行数:33,代码来源:v_main.php

示例4:

 function __construct()
 {
     parent::__construct();
     if (DEVE) {
         debug::$action['m'] = $_GET['m'];
         debug::$action['a'] = $_GET['a'];
     }
 }
开发者ID:laiello,项目名称:ffphp,代码行数:8,代码来源:action.class.php

示例5: __construct

 public function __construct($l, $c, $d = null)
 {
     parent::__construct($l, $c, $d);
     $cont = null;
     foreach ($d['stud_group'] as $gr) {
         $cont .= '<option value="' . $gr['id_student_group'] . '">' . $gr['sg_name'] . '</option>';
     }
     $this->content = preg_replace("/{TRAINS}/Ui", $cont, $this->content);
 }
开发者ID:allok,项目名称:PhpTS,代码行数:9,代码来源:v_admin_users_edit.php

示例6:

 function __construct($blockName)
 {
     parent::__construct();
     $this->model = baseModel::getInstance();
     $this->name = $blockName;
     $this->request = request::getInstance();
     $this->init();
     $this->renderHtml();
 }
开发者ID:phithienthan,项目名称:vnitc,代码行数:9,代码来源:baseBlock.class.php

示例7: __construct

 public function __construct($l, $c, $d = null)
 {
     parent::__construct($l, $c, $d);
     $dop = file_get_contents('tpl/admin_users_info.tpl');
     $cont = null;
     foreach ($d['users'] as $user) {
         $temp = $dop;
         foreach ($user as $k => $item) {
             if ($k == 'id_group') {
                 switch ((int) $item) {
                     case 1:
                         $item = $this->setLabel('danger', '{LABEL="group_adm"}');
                         break;
                     case 2:
                         $item = $this->setLabel('warning', '{LABEL="group_rd"}');
                         break;
                     case 3:
                         $item = $this->setLabel('success', '{LABEL="group_tr"}');
                         break;
                     case 4:
                         $item = $this->setLabel('default', '{LABEL="group_sl"}');
                         break;
                 }
             }
             $temp = preg_replace("/{" . $k . "}/Ui", $item, $temp);
         }
         $cont .= $temp;
     }
     $this->content = preg_replace("/{USER_INFO}/Ui", $cont, $this->content);
     $cont = null;
     if (isset($d['group'])) {
         foreach ($d['group'] as $t) {
             $temp = '<option value="{SID}">{SN}</option>' . "\n";
             $temp = preg_replace("/{SN}/Ui", $t['sg_name'], $temp);
             $temp = preg_replace("/{SID}/Ui", $t['id_student_group'], $temp);
             $cont .= $temp;
         }
     }
     $this->content = preg_replace("/{GROUP_INFO}/Ui", $cont, $this->content);
 }
开发者ID:allok,项目名称:PhpTS,代码行数:40,代码来源:v_admin_users.php

示例8: __construct

 public function __construct($l, $c, $d = null)
 {
     parent::__construct($l, $c, $d);
     $dop = file_get_contents('tpl/admin_set_info.tpl');
     $cont = null;
     foreach ($d['set'] as $s) {
         $temp = $dop;
         foreach ($s as $k => $item) {
             $temp = preg_replace("/{" . $k . "}/Ui", $item, $temp);
         }
         $cont .= $temp;
     }
     $this->content = preg_replace("/{SET_INFO}/Ui", $cont, $this->content);
     $cont = null;
     if (isset($d['test'])) {
         foreach ($d['test'] as $t) {
             $temp = '<option value="{SID}">{SN}</option>' . "\n";
             $temp = preg_replace("/{SN}/Ui", $t['t_test_name'], $temp);
             $temp = preg_replace("/{SID}/Ui", $t['id_test'], $temp);
             $cont .= $temp;
         }
     }
     $this->content = preg_replace("/{TEST_INFO}/Ui", $cont, $this->content);
 }
开发者ID:allok,项目名称:PhpTS,代码行数:24,代码来源:v_admin_set.php

示例9:

 function __construct()
 {
     parent::__construct();
 }
开发者ID:EGArian,项目名称:sarkesh,代码行数:4,代码来源:module.php

示例10:

 function __construct()
 {
     // smartyインスタンスの作成
     $this->smarty = parent::__construct();
 }
开发者ID:yusukehirohara0903,项目名称:test,代码行数:5,代码来源:login.php

示例11: __construct

 public function __construct($viewName = '', $viewPath = '')
 {
     $viewPath = 'public/' . $viewPath;
     parent::__construct($viewName, $viewPath);
 }
开发者ID:sea75300,项目名称:affiliat_r,代码行数:5,代码来源:view_public.php

示例12: __construct

 public function __construct($l, $c, $d = null)
 {
     parent::__construct($l, $c, $d);
 }
开发者ID:allok,项目名称:PhpTS,代码行数:4,代码来源:v_admin.php

示例13:

 function __construct()
 {
     parent::__construct();
     //echo 'vista creada';
     $this->template = template::load('home');
 }
开发者ID:elizabethml,项目名称:Frameworkcontr,代码行数:6,代码来源:vhome.php


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