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


PHP ipsRegistry::cache方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  *
  * @access	public
  * @param	object		Registry reference
  * @return	void
  */
 public function __construct(ipsRegistry $registry)
 {
     //-----------------------------------------
     // Make shortcuts
     //-----------------------------------------
     $this->registry = $registry;
     $this->DB = $registry->DB();
     $this->settings = $registry->fetchSettings();
     $this->member = $registry->member();
     $this->cache = $registry->cache();
     $this->caches =& $registry->cache()->fetchCaches();
     $this->request = $registry->fetchRequest();
     $this->lang = $registry->class_localization;
     if (IN_ACP) {
         //-----------------------------------------
         // Load HTML
         //-----------------------------------------
         $this->html = $this->registry->output->loadTemplate('cp_skin_blocks_feed');
         //-----------------------------------------
         // Set up stuff
         //-----------------------------------------
         $this->form_code = $this->html->form_code = 'module=blocks&section=wizard';
         $this->form_code_js = $this->html->form_code_js = 'module=blocks&section=wizard';
     }
     //-----------------------------------------
     // Get interface
     //-----------------------------------------
     require_once IPSLib::getAppDir('ccs') . '/sources/blocks/feed/feedInterface.php';
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:36,代码来源:admin.php

示例2: __construct

 /**
  * Constructor
  * 
  * @access	public
  * @param	object		ipsRegistry reference
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry)
 {
     $this->DB = $registry->DB();
     $this->settings = $registry->settings();
     $this->member = $registry->member();
     $this->memberData =& $registry->member()->fetchMemberData();
     $this->cache = $registry->cache();
     $this->caches =& $registry->cache()->fetchCaches();
     $this->request = $registry->request();
 }
开发者ID:Advanture,项目名称:Online-RolePlay,代码行数:17,代码来源:example.php

示例3: __construct

 /**
  * Constructor
  *
  * @access	public
  * @param	object		Registry reference
  * @return	void
  */
 public function __construct(ipsRegistry $registry)
 {
     //-----------------------------------------
     // Make shortcuts
     //-----------------------------------------
     $this->registry = $registry;
     $this->DB = $registry->DB();
     $this->settings = $registry->fetchSettings();
     $this->member = $registry->member();
     $this->cache = $registry->cache();
     $this->caches =& $registry->cache()->fetchCaches();
     $this->request = $registry->fetchRequest();
     $this->lang = $registry->class_localization;
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:21,代码来源:members.php

示例4: __construct

 /**
  * @desc			Loads and checks different vars when class is initiating
  * @author			Matthias Reuter
  * @since			2.0
  * @ignore
  */
 public function __construct()
 {
     // check for DB prefix
     if (ipbwi_DB_prefix == '') {
         define('ipbwi_DB_prefix', 'ipbwi_');
     }
     if (defined('ipbwi_LANG')) {
         self::setLang(ipbwi_LANG);
     } else {
         self::setLang('en');
     }
     // initialize IP.board Interface
     require_once ipbwi_ROOT_PATH . 'lib/ips_wrapper.inc.php';
     if (!defined('IPBWI_INCORRECT_BOARD_PATH')) {
         $this->ips_wrapper = new ipbwi_ips_wrapper();
         if (defined('ipbwi_COOKIE_DOMAIN')) {
             $this->board['cookie_domain'] = ipbwi_COOKIE_DOMAIN;
             $this->ips_wrapper->settings['cookie_domain'] = ipbwi_COOKIE_DOMAIN;
             ipsRegistry::$settings['cookie_domain'] = ipbwi_COOKIE_DOMAIN;
         }
         ipsRegistry::cache()->updateCacheWithoutSaving('settings', ipsRegistry::$settings);
         // retrieve common vars
         $this->board = $this->ips_wrapper->settings;
         $this->board['version'] = $this->ips_wrapper->caches['app_cache']['core']['app_version'];
         $this->board['version_long'] = $this->ips_wrapper->caches['app_cache']['core']['app_long_version'];
         $this->board['url'] = str_replace('?', '', $this->ips_wrapper->settings['board_url']) . '/';
         $this->board['name'] = $this->ips_wrapper->settings['board_name'];
         $this->board['basedir'] = ipbwi_BOARD_PATH;
         $this->board['upload_dir'] = $this->ips_wrapper->settings['upload_dir'] . '/';
         $this->board['upload_url'] = $this->ips_wrapper->settings['upload_url'] . '/';
         $this->board['home_name'] = $this->ips_wrapper->settings['home_name'];
         $this->board['home_url'] = $this->ips_wrapper->settings['home_url'] . '/';
         $this->board['emo_url'] = str_replace('<#EMO_DIR#>', 'default', $this->ips_wrapper->settings['emoticons_url']) . '/';
     }
 }
开发者ID:smgladkovskiy,项目名称:kohana-ipbwi,代码行数:41,代码来源:ipbwi.inc.php

示例5: parseOnlineEntries

 /**
  * Parse/format the online list data for the records
  *
  * @access	public
  * @author	Brandon Farber
  * @param	array 			Online list rows to check against
  * @return	array 			Online list rows parsed
  */
 public function parseOnlineEntries($rows)
 {
     if (!is_array($rows) or !count($rows)) {
         return $rows;
     }
     $final = array();
     foreach ($rows as $row) {
         if ($row['current_appcomponent'] == 'core') {
             if ($row['current_module'] == 'global') {
                 if ($row['current_section'] == 'login') {
                     $row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_login'];
                 }
             } else {
                 if ($row['current_module'] == 'search') {
                     $row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_search'];
                 } else {
                     if ($row['current_module'] == 'reports') {
                         $rcCache = ipsRegistry::cache()->getCache('report_cache');
                         if (is_array($rcCache)) {
                             if ($rcCache['group_access'][ipsRegistry::member()->getProperty('member_group_id')] == true) {
                                 $row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_reports'];
                             }
                         }
                     }
                 }
             }
         }
         $final[$row['id']] = $row;
     }
     return $final;
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:39,代码来源:coreExtensions.php

示例6: 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

示例7: __construct

 /**
  * Constructor
  *
  * @param	object		$registry		Registry object
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry)
 {
     //-----------------------------------------
     // Make shortcuts
     //-----------------------------------------
     $this->cache = $registry->cache();
 }
开发者ID:mover5,项目名称:imobackup,代码行数:13,代码来源:permissionsSync.php

示例8: __construct

 public function __construct()
 {
     $this->settings = ipsRegistry::fetchSettings();
     $this->lang = ipsRegistry::getClass('class_localization');
     $this->caches =& ipsRegistry::cache()->fetchCaches();
     $this->cache = ipsRegistry::cache();
     $this->DB = ipsRegistry::DB();
 }
开发者ID:ConnorChristie,项目名称:GrabViews,代码行数:8,代码来源:dashboardNotifications.php

示例9: getFormData

 /**
  * Get Form Data
  *
  * @return	array
  */
 public function getFormData($current)
 {
     /* Get groups */
     $groups = array();
     foreach (ipsRegistry::cache()->getCache('group_cache') as $g) {
         $groups[] = array($g['g_id'], $g['g_title']);
     }
     /* Return */
     return array('group' => array("Is in group", ipsRegistry::getClass('output')->formMultiDropdown('members-group[]', $groups, empty($current) ? array() : $current['group'])), 'last_visit' => array("Last Visit Was", ipsRegistry::getClass('output')->formDropdown('members-last_visit_1', array(array('l', "Less Than"), array('e', "Equal to"), array('g', "Greater Than")), empty($current) ? 'l' : $current['last_visit_1']) . ipsRegistry::getClass('output')->formSimpleInput('members-last_visit_2', empty($current) ? '' : $current['last_visit_2']) . " days ago"), 'joined' => array("Joined", ipsRegistry::getClass('output')->formDropdown('members-joined_1', array(array('l', "Less Than"), array('e', "Equal to"), array('g', "Greater Than")), empty($current) ? 'l' : $current['joined_1']) . ipsRegistry::getClass('output')->formSimpleInput('members-joined_2', empty($current) ? '' : $current['joined_2']) . " days ago"));
 }
开发者ID:mover5,项目名称:imobackup,代码行数:15,代码来源:emailLists.php

示例10: __construct

 /**
  * Constructor
  *
  * @param	object		$registry		Registry object
  * @param	object		$class			Task manager class object
  * @param	array		$task			Array with the task data
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry, $class, $task)
 {
     /* Make registry objects */
     $this->registry = $registry;
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->lang = $this->registry->getClass('class_localization');
     $this->caches =& ipsRegistry::cache()->fetchCaches();
     $this->cache = ipsRegistry::cache();
     $this->class = $class;
     $this->task = $task;
 }
开发者ID:mover5,项目名称:imobackup,代码行数:20,代码来源:cleanout.php

示例11: check

 /**
  * Check service is available
  */
 public function check($return = FALSE)
 {
     $ok = FALSE;
     $licenseData = ipsRegistry::cache()->getCache('licenseData');
     if (isset($licenseData['ipbMain'])) {
         foreach ($licenseData['ipbMain'] as $service) {
             if ($service['name'] == 'Spam Monitoring Service' and $service['status'] == 'Ok') {
                 $ok = TRUE;
                 break;
             }
         }
     }
     if ($return) {
         return $ok;
     }
     if (!$ok) {
         ipsRegistry::getClass('output')->showError(ipsRegistry::getClass('class_localization')->words['enhancements_spammonitoring_error']);
     }
 }
开发者ID:ConnorChristie,项目名称:GrabViews-Live,代码行数:22,代码来源:spammonitoring.php

示例12: getAttachments

 /**
  * Get the actual output.
  * This is abstracted so that the AJAX routine can load and execute this function
  *
  * @param	array 		Topic and attachment data
  * @return	string		HTML output
  */
 public function getAttachments($topic)
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $attach_cache = ipsRegistry::cache()->getCache('attachtypes');
     //-----------------------------------------
     // Get forum skin and lang
     //-----------------------------------------
     $this->registry->getClass('class_localization')->loadLanguageFile(array('public_forums', 'public_topic'), 'forums');
     //-----------------------------------------
     // aight.....
     //-----------------------------------------
     $_queued = !$this->registry->getClass('class_forums')->canQueuePosts($topic['forum_id']) ? ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery(array('visible'), 'p.') : '';
     $_st = $this->request['st'] > 0 ? intval($this->request['st']) : 0;
     $_limit = 50;
     $_pages = '';
     $_count = $this->DB->buildAndFetch(array('select' => 'COUNT(*) as attachments', 'from' => array('posts' => 'p'), 'where' => 'a.attach_id IS NOT NULL AND p.topic_id=' . $topic['tid'] . $_queued, 'add_join' => array(array('from' => array('attachments' => 'a'), 'where' => "a.attach_rel_id=p.pid AND a.attach_rel_module='post'", 'type' => 'left'))));
     if ($_count['attachments'] > $_limit) {
         $_pages = $this->registry->getClass('output')->generatePagination(array('totalItems' => $_count['attachments'], 'itemsPerPage' => $_limit, 'currentStartValue' => $_st, 'baseUrl' => "app=forums&amp;module=forums&amp;section=attach&amp;tid={$topic['tid']}"));
     }
     $this->DB->build(array('select' => 'p.pid, p.topic_id', 'from' => array('posts' => 'p'), 'where' => 'a.attach_id IS NOT NULL AND p.topic_id=' . $topic['tid'] . $_queued, 'order' => 'p.pid ASC, a.attach_id ASC', 'limit' => array($_st, $_limit), 'add_join' => array(array('select' => 'a.*', 'from' => array('attachments' => 'a'), 'where' => "a.attach_rel_id=p.pid AND a.attach_rel_module='post'", 'type' => 'left'))));
     $this->DB->execute();
     while ($row = $this->DB->fetch()) {
         if (IPSMember::checkPermissions('read', $topic['forum_id']) != TRUE) {
             continue;
         }
         if (!$row['attach_id']) {
             continue;
         }
         $row['image'] = str_replace('folder_mime_types', 'mime_types', $attach_cache[$row['attach_ext']]['atype_img']);
         $row['short_name'] = IPSText::truncate($row['attach_file'], 30);
         $row['attach_date'] = $this->registry->getClass('class_localization')->getDate($row['attach_date'], 'SHORT');
         $row['real_size'] = IPSLib::sizeFormat($row['attach_filesize']);
         $rows[] = $row;
     }
     $this->output .= $this->registry->getClass('output')->getTemplate('forum')->forumAttachments($topic['title'], $rows, $_pages);
     return $this->output;
 }
开发者ID:mover5,项目名称:imobackup,代码行数:46,代码来源:attach.php

示例13: loginForm

 /**
  * Log the user out
  *
  * @param	string		Message to show on the form
  * @return	@e void
  */
 public function loginForm($message = '')
 {
     //-----------------------------------------
     // Hang on, do we need the upgrader?
     //-----------------------------------------
     if (!IN_DEV and (!defined('SKIP_UPGRADE_CHECK') or !SKIP_UPGRADE_CHECK)) {
         require_once IPS_ROOT_PATH . 'setup/sources/base/setup.php';
         /*noLibHook*/
         foreach (ipsRegistry::$applications as $app_dir => $app) {
             $_a = ($app_dir == 'forums' or $app_dir == 'members') ? 'core' : $app_dir;
             $numbers = IPSSetUp::fetchAppVersionNumbers($_a);
             if ($numbers['latest'][0] and $numbers['latest'][0] > $numbers['current'][0]) {
                 $this->registry->output->silentRedirect($this->settings['base_acp_url'] . '/upgrade/index.php?_acpRedirect=1');
                 return;
             }
         }
     }
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $message = $message ? $message : $this->member->sessionClass()->getMessage();
     //-------------------------------------------------------
     // Remove all out of date sessions, like a good boy. Woof.
     //-------------------------------------------------------
     $cut_off_stamp = time() - 60 * 60 * 2;
     $this->DB->delete('core_sys_cp_sessions', "session_running_time < {$cut_off_stamp}");
     //------------------------------------------------------
     // Start form
     //------------------------------------------------------
     $qs = str_replace('&amp;', '&', IPSText::parseCleanValue(urldecode(my_getenv('QUERY_STRING'))));
     $qs = str_replace('adsess=', 'old_adsess=', $qs);
     $qs = str_replace('module=menu', '', $qs);
     $additional_data = $this->han_login->additionalFormHTML();
     $replace = false;
     $data = array();
     if (!is_null($additional_data) and is_array($additional_data) and count($additional_data)) {
         $replace = $additional_data[0];
         $data = $additional_data[1];
     }
     $uses_name = false;
     $uses_email = false;
     foreach (ipsRegistry::cache()->getCache('login_methods') as $method) {
         $login_methods[$method['login_folder_name']] = $method['login_folder_name'];
         if ($method['login_user_id'] == 'username' or $method['login_user_id'] == 'either') {
             $uses_name = true;
         }
         if ($method['login_user_id'] == 'email' or $method['login_user_id'] == 'either') {
             $uses_email = true;
         }
     }
     if ($uses_name and $uses_email) {
         $this->lang->words['gl_signinname'] = $this->lang->words['enter_name_and_email'];
     } else {
         if ($uses_email) {
             $this->lang->words['gl_signinname'] = $this->lang->words['enter_useremail'];
         } else {
             $this->lang->words['gl_signinname'] = $this->lang->words['enter_username'];
         }
     }
     ipsRegistry::getClass('output')->html_title = $this->lang->words['ipb_login'];
     ipsRegistry::getClass('output')->html_main = ipsRegistry::getClass('output')->global_template->log_in_form($qs, $message, $replace == 'replace' ? true : false, $data);
     ipsRegistry::getClass('output')->html_main = str_replace('<%TITLE%>', ipsRegistry::getClass('output')->html_title, ipsRegistry::getClass('output')->html_main);
     @header("Content-type: text/html");
     print ipsRegistry::getClass('output')->html_main;
     exit;
 }
开发者ID:ConnorChristie,项目名称:GrabViews,代码行数:72,代码来源:manualResolver.php

示例14: handshakeRemove

 /**
  * handshake_server::handshake_remove()
  *
  * Unconverges an application
  * 
  * @access	public
  * @param	integer		$reg_id			Converge reg ID
  * @param	string		$reg_code		Converge API Code (MUST BE PRESENT IN ALL RETURNED API REQUESTS).
  * @return	mixed		xml / boolean false
  **/
 public function handshakeRemove($reg_product_id = '', $reg_code = '')
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $reg_product_id = intval($reg_product_id);
     $reg_code = IPSText::md5Clean($reg_code);
     //-----------------------------------------
     // Grab data from the DB
     //-----------------------------------------
     $converge = $this->registry->DB()->buildAndFetch(array('select' => '*', 'from' => 'converge_local', 'where' => "converge_api_code='" . $reg_code . "' AND converge_product_id=" . $reg_product_id));
     //-----------------------------------------
     // Check
     //-----------------------------------------
     if ($converge['converge_active']) {
         //-----------------------------------------
         // Remove app stuff
         //-----------------------------------------
         $this->registry->DB()->delete('converge_local', 'converge_product_id=' . intval($reg_product_id));
         //-----------------------------------------
         // Switch over log in methods
         //-----------------------------------------
         $this->registry->DB()->update("login_methods", array("login_enabled" => 0), "login_folder_name='ipconverge'");
         $cache = array();
         $this->registry->DB()->build(array('select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1'));
         $this->registry->DB()->execute();
         while ($r = $this->registry->DB()->fetch()) {
             $cache[$r['login_id']] = $r;
         }
         ipsRegistry::cache()->setCache('login_methods', $cache, array('array' => 1, 'deletefirst' => 1));
         $this->classApiServer->apiSendReply(array('handshake_removed' => 1));
     } else {
         $this->classApiServer->apiSendReply(array('handshake_removed' => 0));
     }
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:45,代码来源:converge.php

示例15: loginsRecache

 /**
  * Updates cache store record
  *
  * @return	boolean		Cache store updated successfully
  */
 public function loginsRecache()
 {
     $cache = array();
     $this->DB->build(array('select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1', 'order' => 'login_order ASC'));
     $this->DB->execute();
     while ($r = $this->DB->fetch()) {
         $cache[$r['login_id']] = $r;
     }
     ipsRegistry::cache()->setCache('login_methods', $cache, array('array' => 1));
 }
开发者ID:ConnorChristie,项目名称:GrabViews,代码行数:15,代码来源:login.php


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