本文整理汇总了PHP中core::view方法的典型用法代码示例。如果您正苦于以下问题:PHP core::view方法的具体用法?PHP core::view怎么用?PHP core::view使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core
的用法示例。
在下文中一共展示了core::view方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view
public static function view($_view_file, $_view_vars = array(), $_view_type = null, $_view_show = null)
{
$map = self::_get_map();
$_view_vars['lang'] = get_lang();
$_view_vars['charset'] = CHARSET;
$_view_vars['done'] = self::$_done;
$_view_vars['doing'] = self::$_doing;
$_view_vars['step_num'] = array_search(self::$_doing, $map) + 1;
$_view_vars['step_name'] = get_lang(self::$_doing . "_title");
$_view_vars['step_desc'] = get_lang(self::$_doing . "_desc");
$_view_vars['hiddens'] = self::$_hiddens;
$_view_vars['map'] = $map;
parent::view($_view_file, $_view_vars, $_view_type, $_view_show);
}
示例2: index
/**
* 默认首页
*/
public static final function index()
{
core::view(__CLASS__ . '/' . __FUNCTION__ . '.tpl');
}
示例3: world
/**
* hello world
*/
public static final function world()
{
core::view(__CLASS__ . '/' . __FUNCTION__ . '.tpl', array('world' => $_GET['do']));
}
示例4: view2
public static function view2($_view_file_global = null, $_view_vars = null, $_view_type = null, $_view_show = null)
{
//$config = parent::init('config');
if (is_string($_view_file_global) && strstr($_view_file_global, '.')) {
$str = parent::view($_view_file_global, $_view_vars, $_view_type, false);
if ($config['siteRewrite'] == false) {
$array = array('@([\\w\\d\\-]+)_([\\d]+).html@isU' => '?go=news&do=detail&news_id=$2');
$a1 = array_keys($array);
$a2 = array_values($array);
if ($_view_show === false) {
return preg_replace($a1, $a2, $str);
}
$html = preg_replace($a1, $a2, $str);
} else {
$array = array('@\\?go=user@isU' => 'My-Account.html');
$a1 = array_keys($array);
$a2 = array_values($array);
if ($_view_show === false) {
return preg_replace($a1, $a2, $str);
}
$html = preg_replace($a1, $a2, $str);
}
//$html = strip_tags($html,'<p><a><b><html><body><!DOCTYPE><div><table><tr><td><th><input><select><option>');
if (IN_WAP) {
$array = array('@<\\!DOCTYPE[^>]+>@isU' => '', '@<html[^>]+>@isU' => '<html>', '@<link[^>]+>@isU' => '', '@<script[^>]*?>[^<]+?</script>@isU' => '', '@<script[^>]*?></script>@isU' => '', '@ @isU' => ' ');
$a1 = array_keys($array);
$a2 = array_values($array);
$html = preg_replace($a1, $a2, $html);
}
echo $html;
} else {
return parent::view($_view_file_global, $_view_vars, $_view_type, $_view_show);
}
}