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