当前位置: 首页>>代码示例>>PHP>>正文


PHP ipsRegistry::instance方法代码示例

本文整理汇总了PHP中ipsRegistry::instance方法的典型用法代码示例。如果您正苦于以下问题:PHP ipsRegistry::instance方法的具体用法?PHP ipsRegistry::instance怎么用?PHP ipsRegistry::instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ipsRegistry的用法示例。


在下文中一共展示了ipsRegistry::instance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     $this->registry = ipsRegistry::instance();
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->memberData =& $this->registry->member()->fetchMemberData();
 }
开发者ID:Advanture,项目名称:Online-RolePlay,代码行数:7,代码来源:sidebarprofile_1b1f007f1e342846969e722885116283.php

示例2: __construct

 public function __construct()
 {
     $this->registry = ipsRegistry::instance();
     $this->member = $this->registry->member();
     $this->memberData =& $this->registry->member()->fetchMemberData();
     $this->registry->class_localization->loadLanguageFile(array('public_topic'), 'forums');
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:7,代码来源:boardIndexWatchedItems_9466b18e87f268224a349b3dacd12892.php

示例3: __construct

 /**
  * Constructor
  * 
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry)
 {
     /* Get class forums, used for displaying forum names on results */
     if (ipsRegistry::isClassLoaded('class_forums') !== TRUE) {
         $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir('forums') . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums');
         ipsRegistry::setClass('class_forums', new $classToLoad(ipsRegistry::instance()));
         ipsRegistry::getClass('class_forums')->strip_invisible = 1;
         ipsRegistry::getClass('class_forums')->forumsInit();
     }
     /* Load tagging stuff */
     if (!$registry->isClassLoaded('tags')) {
         require_once IPS_ROOT_PATH . 'sources/classes/tags/bootstrap.php';
         /*noLibHook*/
         $registry->setClass('tags', classes_tags_bootstrap::run('forums', 'topics'));
     }
     /* Get live or archive */
     $this->searchArchives = ipsRegistry::$request['search_app_filters']['forums']['liveOrArchive'] == 'archive' ? true : false;
     if ($this->searchArchives) {
         /* Load up archive class */
         $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/archive/reader.php', 'classes_archive_reader');
         $this->archiveReader = new $classToLoad();
         $this->archiveReader->setApp('forums');
         $this->table = $this->archiveReader->getFields();
         $this->table['_table_'] = 'forums_archive_posts';
         $this->table['_prefix_'] = 'p.archive_';
     } else {
         $this->table = array('_table_' => 'posts', '_prefix_' => 'p.', 'pid' => 'pid', 'author_id' => 'author_id', 'author_name' => 'author_name', 'ip_address' => 'ip_address', 'post_date' => 'post_date', 'post' => 'post', 'queued' => 'queued', 'topic_id' => 'topic_id', 'new_topic' => 'new_topic', 'post_bwoptions' => 'post_bwoptions', 'post_key' => 'post_key', 'post_htmlstate' => 'post_htmlstate', 'use_sig' => 'use_sig', 'use_emo' => 'use_emo', 'append_edit' => 'append_edit', 'edit_time' => 'edit_time', 'edit_name' => 'edit_name', 'post_edit_reason' => 'post_edit_reason');
     }
     parent::__construct($registry);
     /* Set up wrapper */
     $this->templates = array('group' => 'search', 'template' => 'searchResultsAsForum');
 }
开发者ID:ConnorChristie,项目名称:GrabViews-Live,代码行数:37,代码来源:format.php

示例4: __construct

 public function __construct()
 {
     $this->registry = ipsRegistry::instance();
     $this->settings = ipsRegistry::fetchSettings();
     $this->lang = $this->registry->getClass('class_localization');
     ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_lang'), 'syncApp');
 }
开发者ID:Orfeous,项目名称:syncApp,代码行数:7,代码来源:dashboardNotifications.php

示例5: __construct

 /**
  * CONSTRUCTOR
  *
  * @return      @e void
  */
 public function __construct()
 {
     $this->registry = ipsRegistry::instance();
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->request =& $this->registry->fetchRequest();
     $this->lang = $this->registry->getClass('class_localization');
     ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_lang'), 'syncApp');
     $this->member = $this->registry->member();
     $this->memberData =& $this->registry->member()->fetchMemberData();
     $this->cache = $this->registry->cache();
     $this->caches =& $this->registry->cache()->fetchCaches();
     $sqlPassed = FALSE;
     $classname = "db_driver_Mysql";
     $sync_DB = new $classname();
     $sync_DB->obj['sql_database'] = $this->settings['syncapp_realm_database'];
     $sync_DB->obj['sql_user'] = $this->settings['syncapp_mysql_user'];
     $sync_DB->obj['sql_pass'] = $this->settings['syncapp_mysql_password'];
     $sync_DB->obj['sql_host'] = $this->settings['syncapp_mysql_ip'];
     $sync_DB->return_die = true;
     if (!$sync_DB->connect()) {
         $fail = 1;
         return $fail;
         /* At this point we dont have a connection so ABORT! else database driver error */
     }
     if ($this->settings['syncapp_mysql_user'] || $this->settings['syncapp_mysql_password'] || $fail != 1) {
         $this->sqlPassed = TRUE;
         $this->registry->dbFunctions()->setDB('mysql', 'auth_DB', array('sql_database' => $this->settings['syncapp_realm_database'], 'sql_user' => $this->settings['syncapp_mysql_user'], 'sql_pass' => $this->settings['syncapp_mysql_password'], 'sql_host' => $this->settings['syncapp_mysql_ip']));
     } else {
         return;
     }
 }
开发者ID:Orfeous,项目名称:syncApp,代码行数:37,代码来源:memberSync.php

示例6: __construct

 public function __construct($group, $skinSet)
 {
     $this->registry = ipsRegistry::instance();
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->request =& $this->registry->fetchRequest();
     $this->cache = $this->registry->cache();
     $this->caches =& $this->registry->cache()->fetchCaches();
     /* Require some files for our sabre implementation */
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/root/skins.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/directory/templates.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/files/templates.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/lock/nolocks.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php';
     /*noLibHook*/
     $this->skinFunctions = new skinCaching($this->registry);
     $this->_skinSet = $skinSet;
     $this->_group = $group;
 }
开发者ID:ConnorChristie,项目名称:GrabViews,代码行数:25,代码来源:groups.php

示例7: __construct

 /**
  * Constructor
  *
  * @param	object	Database reference
  * @return	@e void
  */
 public function __construct(&$obj)
 {
     $reg = ipsRegistry::instance();
     $this->member = $reg->member();
     $this->DB = $reg->DB();
     $this->tbl = ips_DBRegistry::getPrefix();
 }
开发者ID:Advanture,项目名称:Online-RolePlay,代码行数:13,代码来源:mysql_tag_queries.php

示例8: __construct

 /**
  * Constructor
  *
  * Use this to do any initiation required by your application
  */
 public function __construct()
 {
     //-----------------------------------------
     // Init IPB
     //-----------------------------------------
     define('IPS_ENFORCE_ACCESS', TRUE);
     define('IPB_THIS_SCRIPT', 'public');
     require_once '../../initdata.php';
     require_once IPS_ROOT_PATH . 'sources/base/ipsRegistry.php';
     require_once IPS_ROOT_PATH . 'sources/base/ipsController.php';
     $this->registry = ipsRegistry::instance();
     $this->registry->init();
     //-----------------------------------------
     // Set up shortcuts
     //-----------------------------------------
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->request =& $this->registry->fetchRequest();
     $this->lang = $this->registry->getClass('class_localization');
     $this->member = $this->registry->member();
     $this->cache = $this->registry->cache();
     $this->caches =& $this->registry->cache()->fetchCaches();
     $this->masterKey = md5(md5($this->settings['sql_user'] . $this->settings['sql_pass']) . $this->settings['board_start']);
     //-----------------------------------------
     // Init han_login
     //-----------------------------------------
     $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login');
     $this->han_login = new $classToLoad($this->registry);
     $this->han_login->init();
 }
开发者ID:ConnorChristie,项目名称:GrabViews,代码行数:35,代码来源:ipsconnect.php

示例9: __construct

 public function __construct($skinSet, $template = null, $title = null, $group = null)
 {
     $this->registry = ipsRegistry::instance();
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->request =& $this->registry->fetchRequest();
     $this->cache = $this->registry->cache();
     $this->caches =& $this->registry->cache()->fetchCaches();
     /* Require some files for our sabre implementation */
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/root/skins.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/directory/templates.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/directory/groups.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/lock/nolocks.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php';
     /*noLibHook*/
     $this->skinFunctions = new skinCaching($this->registry);
     $this->_skinSet = $skinSet;
     $this->_group = $group;
     if ($template) {
         $this->_template = $template;
         $this->_title = $this->_group == 'css' ? $template['css_group'] : $template['template_name'];
     } else {
         $this->_title = $title;
     }
 }
开发者ID:mover5,项目名称:imobackup,代码行数:31,代码来源:templates.php

示例10: init

 /**
  * Loads the registry class
  *
  * @return @e void
  */
 public function init()
 {
     /* Path not set? */
     if (!$this->path_to_ipb) {
         /* Constant available? */
         if (defined('DOC_IPS_ROOT_PATH')) {
             $this->path_to_ipb = DOC_IPS_ROOT_PATH;
         } else {
             /* Fallback.. */
             $this->path_to_ipb = dirname(__FILE__) . '/../../';
         }
     }
     /* Load the registry */
     require_once $this->path_to_ipb . 'initdata.php';
     /*noLibHook*/
     require_once $this->path_to_ipb . CP_DIRECTORY . '/sources/base/ipsRegistry.php';
     /*noLibHook*/
     $this->registry = ipsRegistry::instance();
     $this->registry->init();
     /* Make registry shortcuts */
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->request =& $this->registry->fetchRequest();
     $this->lang = $this->registry->getClass('class_localization');
     $this->member = $this->registry->member();
     $this->memberData =& $this->registry->member()->fetchMemberData();
     $this->cache = $this->registry->cache();
     $this->caches =& $this->registry->cache()->fetchCaches();
     /* INIT Child? */
     if (method_exists($this, 'childInit')) {
         $this->childInit();
     }
 }
开发者ID:ConnorChristie,项目名称:GrabViews-Live,代码行数:38,代码来源:api_core.php

示例11: returnRSSDocument

 /**
  * Grab the RSS document content and return it
  * 
  * @return	string		RSS document
  */
 public function returnRSSDocument()
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $cal_id = intval(ipsRegistry::$request['id']);
     $rss_data = array();
     $to_print = '';
     $this->expires = time();
     $_calendarCache = ipsRegistry::cache()->getCache('calendars');
     //-----------------------------------------
     // Get RSS export
     //-----------------------------------------
     $rss_data = $_calendarCache[$cal_id];
     //-----------------------------------------
     // Got one?
     //-----------------------------------------
     if ($rss_data['cal_id'] and $rss_data['cal_rss_export']) {
         //-----------------------------------------
         // Correct expires time
         //-----------------------------------------
         $this->expires = $rss_data['cal_rss_update_last'] + $rss_data['cal_rss_update'] * 60;
         //-----------------------------------------
         // Need to recache?
         //-----------------------------------------
         if (!$rss_data['cal_rss_cache'] or time() - $rss_data['cal_rss_update'] * 60 > $rss_data['cal_rss_update_last']) {
             $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir('calendar') . '/sources/cache.php', 'calendar_cache', 'calendar');
             $rss_export = new $classToLoad(ipsRegistry::instance());
             return $rss_export->rebuildCalendarRSSCache($rss_data['cal_id']);
         } else {
             return $rss_data['cal_rss_cache'];
         }
     }
 }
开发者ID:mover5,项目名称:imobackup,代码行数:39,代码来源:rssOutput.php

示例12: __construct

 /**
  * Constructor
  *
  */
 public function __construct()
 {
     /* Make registry objects */
     $this->registry = ipsRegistry::instance();
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->request =& $this->registry->fetchRequest();
     $this->lang = $this->registry->getClass('class_localization');
     $this->member = $this->registry->member();
     $this->memberData =& $this->registry->member()->fetchMemberData();
     $this->cache = $this->registry->cache();
     $this->caches =& $this->registry->cache()->fetchCaches();
     /* Check for class_forums */
     if (ipsRegistry::isClassLoaded('class_forums') !== TRUE) {
         $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir('forums') . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums');
         $this->registry->setClass('class_forums', new $classToLoad($this->registry));
         $this->registry->class_forums->forumsInit();
     }
     /* Load topic class */
     if (!$this->registry->isClassLoaded('topics')) {
         $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir('forums') . "/sources/classes/topics.php", 'app_forums_classes_topics', 'forums');
         $this->registry->setClass('topics', new $classToLoad($this->registry));
     }
     /* Language class */
     $this->registry->getClass('class_localization')->loadLanguageFile(array('public_global'), 'core');
     /* Fetch engine class */
     $this->settings['archive_engine'] = $this->settings['archive_engine'] ? $this->settings['archive_engine'] : 'sql';
     /* Load up archive class */
     $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/archive/reader/' . $this->settings['archive_engine'] . '.php', 'classes_archive_reader_' . $this->settings['archive_engine']);
     $this->engine = new $classToLoad();
     $this->fields = $this->registry->topics->getPostTableFields();
 }
开发者ID:Advanture,项目名称:Online-RolePlay,代码行数:36,代码来源:reader.php

示例13: __construct

 /**
  * Constructor
  * 
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry)
 {
     /* Hard limit - not used in Sphinx but may need to revisit if we bust IN()s */
     //IPSSearchRegistry::set('set.hardLimit', ( ipsRegistry::$settings['search_hardlimit'] ) ? ipsRegistry::$settings['search_hardlimit'] : 200 );
     /* Get class forums, used for displaying forum names on results */
     if (ipsRegistry::isClassLoaded('class_forums') !== TRUE) {
         $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir('forums') . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums');
         ipsRegistry::setClass('class_forums', new $classToLoad(ipsRegistry::instance()));
         ipsRegistry::getClass('class_forums')->strip_invisible = 1;
         ipsRegistry::getClass('class_forums')->forumsInit();
     }
     /* Get live or archive */
     $this->searchArchives = ipsRegistry::$request['search_app_filters']['forums']['liveOrArchive'] == 'archive' ? true : false;
     if ($this->searchArchives) {
         /* Load up archive class */
         $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/archive/reader.php', 'classes_archive_reader');
         $this->archiveReader = new $classToLoad();
         $this->archiveReader->setApp('forums');
         $this->table = $this->archiveReader->getFields();
         $this->table['_table_'] = 'forums_archive_posts';
         $this->table['_prefix_'] = 'p.archive_';
         $this->table['forums_search_posts_main'] = 'forums_search_archive_main';
         $this->table['forums_search_posts_delta'] = 'forums_search_archive_delta';
         /* disable max days search */
         $this->settings['search_ucontent_days'] = 0;
     } else {
         $this->table = array('_table_' => 'posts', '_prefix_' => 'p.', 'pid' => 'pid', 'author_id' => 'author_id', 'author_name' => 'author_name', 'ip_address' => 'ip_address', 'post_date' => 'post_date', 'post' => 'post', 'queued' => 'queued', 'topic_id' => 'topic_id', 'new_topic' => 'new_topic', 'post_bwoptions' => 'post_bwoptions', 'post_key' => 'post_key', 'post_htmlstate' => 'post_htmlstate', 'use_sig' => 'use_sig', 'use_emo' => 'use_emo', 'append_edit' => 'append_edit', 'edit_time' => 'edit_time', 'edit_name' => 'edit_name', 'post_edit_reason' => 'post_edit_reason', 'forums_search_posts_main' => 'forums_search_posts_main', 'forums_search_posts_delta' => 'forums_search_posts_delta');
     }
     parent::__construct($registry);
 }
开发者ID:mover5,项目名称:imobackup,代码行数:35,代码来源:sphinx.php

示例14: __construct

 public function __construct()
 {
     /* Make registry objects */
     $this->registry = ipsRegistry::instance();
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->lang = $this->registry->getClass('class_localization');
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:8,代码来源:boardIndexCalendar_8f10f146ad539ac0b4b28d0a6a732d20.php

示例15: __construct

 /**
  * Constructor
  *
  * @access	public
  * @param	object	ipsRegistry
  * @return	void
  */
 public function __construct()
 {
     /* Make object */
     $this->registry = ipsRegistry::instance();
     $this->DB = $this->registry->DB();
     $this->_importTemplates();
     $this->_importSite();
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:15,代码来源:ccs_mysql_inserts.php


注:本文中的ipsRegistry::instance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。