本文整理汇总了PHP中view::instance方法的典型用法代码示例。如果您正苦于以下问题:PHP view::instance方法的具体用法?PHP view::instance怎么用?PHP view::instance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类view
的用法示例。
在下文中一共展示了view::instance方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CoreBase
function CoreBase()
{
global $i18n;
$view =& view::instance();
$this->db =& $view->db;
$this->i18n =& $i18n;
}
示例2: xml_feed
/**
* Constructor
*/
function xml_feed()
{
$this->view =& view::instance();
$this->db_conf =& new db_config();
$this->rewrite = $this->db_conf->get_config('mod_rewrite');
$this->http_root = get_httproot();
}
示例3: CoreRewrite
function CoreRewrite()
{
$view =& view::instance();
$this->db =& $view->db;
$rewrite = $this->rewrite;
}
示例4: tree
/**
* Constructor
*/
function tree()
{
$this->view =& view::instance();
}
示例5: db_config
/**
* Constructor
*/
function db_config()
{
$this->view =& view::instance();
}
示例6: header
*
*/
@(include_once 'administration/inc/config.php');
if (!defined('CORE_INSTALLED')) {
header('Location: install/install.php');
exit;
}
require_once 'inc/common_lib.php';
require_once pathjoin(ROOT, 'inc', 'main_lib.php');
// mysql_server_version
get_mysql_server_version();
$required_classes = array('db_mysql.php', 'fast_template.php', 'calendar.php', 'view.php', 'tree.php', 'db_config.php', 'corebase.php', 'news.php', 'corenews.php', 'corerewrite.php');
while (list($c) = each($required_classes)) {
require_once pathjoin(PATH_TO_CLASSES, 'cls_' . $required_classes[$c]);
}
$view =& view::instance();
$tree =& new tree();
$db =& new DB_Sql();
$db_conf =& new db_config();
$CoreRewrite = new CoreRewrite();
$rewrite = $db_conf->get_config('mod_rewrite');
$max_photo_width = $db_conf->get_config('max_photo_width');
$date_format = $db_conf->get_config('date_format');
$show_calendar = $db_conf->get_config('show_calendar');
$lang = $db_conf->get_config('language_set');
require_once pathjoin(ROOT, 'i18n', $lang, 'i18n.php');
// counter
if (!isset($_COOKIE['core_counter'])) {
@setcookie('core_counter', 'hit', time() + 10800);
$db_conf->set_config('counter', $db_conf->get_config('counter') + 1);
}