本文整理汇总了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);
}
}
示例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);
}
示例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}
}
示例4:
function __construct()
{
parent::__construct();
if (DEVE) {
debug::$action['m'] = $_GET['m'];
debug::$action['a'] = $_GET['a'];
}
}
示例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);
}
示例6:
function __construct($blockName)
{
parent::__construct();
$this->model = baseModel::getInstance();
$this->name = $blockName;
$this->request = request::getInstance();
$this->init();
$this->renderHtml();
}
示例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);
}
示例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);
}
示例9:
function __construct()
{
parent::__construct();
}
示例10:
function __construct()
{
// smartyインスタンスの作成
$this->smarty = parent::__construct();
}
示例11: __construct
public function __construct($viewName = '', $viewPath = '')
{
$viewPath = 'public/' . $viewPath;
parent::__construct($viewName, $viewPath);
}
示例12: __construct
public function __construct($l, $c, $d = null)
{
parent::__construct($l, $c, $d);
}
示例13:
function __construct()
{
parent::__construct();
//echo 'vista creada';
$this->template = template::load('home');
}