當前位置: 首頁>>代碼示例>>PHP>>正文


PHP view::instance方法代碼示例

本文整理匯總了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;
 }
開發者ID:BackupTheBerlios,項目名稱:core-svn,代碼行數:7,代碼來源:cls_corebase.php

示例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();
 }
開發者ID:BackupTheBerlios,項目名稱:core-svn,代碼行數:10,代碼來源:cls_xml_feed.php

示例3: CoreRewrite

 function CoreRewrite()
 {
     $view =& view::instance();
     $this->db =& $view->db;
     $rewrite = $this->rewrite;
 }
開發者ID:BackupTheBerlios,項目名稱:core-svn,代碼行數:6,代碼來源:cls_corerewrite.php

示例4: tree

 /**
  * Constructor
  */
 function tree()
 {
     $this->view =& view::instance();
 }
開發者ID:BackupTheBerlios,項目名稱:core-svn,代碼行數:7,代碼來源:cls_tree.php

示例5: db_config

 /**
  * Constructor
  */
 function db_config()
 {
     $this->view =& view::instance();
 }
開發者ID:BackupTheBerlios,項目名稱:core-svn,代碼行數:7,代碼來源:cls_db_config.php

示例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);
}
開發者ID:BackupTheBerlios,項目名稱:core-svn,代碼行數:31,代碼來源:index.php


注:本文中的view::instance方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。