本文整理匯總了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);
}