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


PHP object::cache方法代码示例

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


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

示例1: __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

示例2: __construct

 /**
  * Method constructor
  *
  * @return	@e void
  */
 public function __construct()
 {
     /* Make object */
     $this->registry = ipsRegistry::instance();
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->request =& $this->registry->fetchRequest();
     $this->member = $this->registry->member();
     $this->memberData =& $this->registry->member()->fetchMemberData();
     $this->cache = $this->registry->cache();
     $this->caches =& $this->registry->cache()->fetchCaches();
 }
开发者ID:ConnorChristie,项目名称:GrabViews,代码行数:17,代码来源:bing.php

示例3: __construct

 /**
  * CONSTRUCTOR
  *
  * @param	object	Registry
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry)
 {
     /* Make registry objects */
     $this->registry = $registry;
     $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();
 }
开发者ID:ConnorChristie,项目名称:GrabViews,代码行数:19,代码来源:photo.php

示例4: __construct

 /**
  * Constructor
  *
  * @param	object		$registry		Registry object
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry)
 {
     /* Make object */
     $this->registry = $registry;
     $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();
     //-----------------------------------------
     // Need to reset?
     //-----------------------------------------
     if ($this->memberData['msg_count_reset']) {
         $this->memberData['pconversation_filters'] = $this->resetMembersFolderCounts($this->memberData['member_id']);
         $this->resetMembersTotalTopicCount($this->memberData['member_id']);
         $this->resetMembersNewTopicCount($this->memberData['member_id']);
     }
     /* Load parser */
     $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser');
     $this->Parser = new $classToLoad();
     /* Set up parser */
     $this->Parser->set(array('memberData' => $this->memberData, 'parseBBCode' => 1, 'parseArea' => 'pms', 'parseHtml' => 0, 'parseEmoticons' => 1));
     //-----------------------------------------
     // INIT Folder contents
     //-----------------------------------------
     $folderContents = array();
     //-----------------------------------------
     // Do a little set up, do a litle dance, get
     // down tonight! *boogie*
     //-----------------------------------------
     $this->_dirData = $this->explodeFolderData($this->memberData['pconversation_filters']);
     //-----------------------------------------
     // Do we have VID?
     // No, it's just the way we walk! Haha, etc.
     //-----------------------------------------
     if ($this->request['folderID'] and $this->request['folderID']) {
         $this->_currentFolderID = $this->request['folderID'];
     } else {
         /* Got any new messages? If so, show that. If not, show myconvo
            I'm sure you could have figured that out without this silly comment...*/
         $this->_currentFolderID = $this->_dirData['new']['count'] ? 'new' : 'myconvo';
     }
     //-----------------------------------------
     // Print folder links
     //-----------------------------------------
     foreach ($this->_dirData as $id => $data) {
         if ($data['protected'] and $id != 'myconvo') {
             continue;
         }
         $folderContents[] = "<option value='move_{$id}'>{$data['real']}</option>";
     }
     if (count($folderContents) > 1) {
         $this->_jumpMenu = implode("\n", $folderContents);
     } else {
         $this->_jumpMenu = '';
     }
 }
开发者ID:Advanture,项目名称:Online-RolePlay,代码行数:66,代码来源:messengerFunctions.php

示例5: fetchStats

 /**
  * Returns details about the board
  * 
  * @param	string  $api_key  	Authentication Key
  * @param	string  $api_module  Module
  * @return	string	xml
  */
 public function fetchStats($api_key, $api_module)
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $api_key = IPSText::md5Clean($api_key);
     $api_module = IPSText::parseCleanValue($api_module);
     //-----------------------------------------
     // Authenticate
     //-----------------------------------------
     if ($this->__authenticate($api_key, $api_module, 'fetchStats') !== FALSE) {
         //-----------------------------------------
         // Add log
         //-----------------------------------------
         $this->addLogging($api_key);
         $stats = $this->registry->cache()->getCache('stats');
         $most_time = ipsRegistry::getClass('class_localization')->getDate($stats['most_date'], 'LONG');
         $most_count = ipsRegistry::getClass('class_localization')->formatNumber($stats['most_count']);
         $total_posts = $stats['total_topics'] + $stats['total_replies'];
         $total_posts = ipsRegistry::getClass('class_localization')->formatNumber($total_posts);
         $mem_count = ipsRegistry::getClass('class_localization')->formatNumber($stats['mem_count']);
         $mem_last_id = $stats['last_mem_id'];
         $mem_last_name = $stats['last_mem_name'];
         //-----------------------------------------
         // Return info
         //-----------------------------------------
         $this->classApiServer->apiSendReply(array('users_most_online' => $most_count, 'users_most_date_formatted' => $most_time, 'users_most_data_unix' => $stats['most_date'], 'total_posts' => $total_posts, 'total_members' => $mem_count, 'last_member_id' => $mem_last_id, 'last_member_name' => $mem_last_name));
         exit;
     }
 }
开发者ID:ConnorChristie,项目名称:GrabViews,代码行数:37,代码来源:api.php

示例6: __construct

 /**
  * Method constructor
  *
  * @access	public
  * @param	string		Application
  * @return	@e void
  * 
  */
 public function __construct($app = 'core')
 {
     /* Make object */
     $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();
     /* Set local data */
     $this->setApp($app);
     /* Load application file */
     $this->_loadExtension();
 }
开发者ID:ConnorChristie,项目名称:GrabViews-Live,代码行数:25,代码来源:build.php

示例7: __construct

 /**
  * Constructor
  *
  * @access	public
  * @param	object		Registry object
  * @return	void
  */
 public function __construct(ipsRegistry $registry)
 {
     /* Make object */
     $this->registry = $registry;
     $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();
     $this->lang->loadLanguageFile(array('public_profile'));
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:21,代码来源:comments.php

示例8: findFile

 /**
  * The JIT find file patcher.
  *
  * @param  object $loader The autloader instance.
  * @param  string $class  The fully-namespaced class name.
  * @param  string $file   The correponding finded file path.
  * @return string         The patched file path.
  */
 public function findFile($loader, $class, $file)
 {
     if ($file) {
         return $file;
     }
     $allowed = empty($this->_namespaces);
     foreach ($this->_namespaces as $ns) {
         if (strpos($class, $ns) === 0) {
             $allowed = true;
         }
     }
     if (!DummyClassPlugin::enabled() || !$allowed) {
         return $file;
     }
     $classpath = strtr($class, '\\', DS);
     return $loader->cache('/dummies/' . $classpath . '.php', static::generate(compact('class')));
 }
开发者ID:nurka1109,项目名称:kahlan,代码行数:25,代码来源:DummyClass.php

示例9: newPost

 /**
  * XMLRPC_server::newPost()
  *
  * Post a new entry.
  *
  * @access	public
  * @param	int		$blogid       	   			Blog ID
  * @param	string	$username					Username
  * @param	string	$password					Password
  * @param	array	$content					Post content
  * @param	bool	$publish					Publish?
  * @return	string	xml
  **/
 public function newPost($blogid, $username, $password, $content, $publish)
 {
     $this->registry->class_localization->loadLanguageFile(array('public_portal'), 'blog');
     //-----------------------------------------
     // Authenticate
     //-----------------------------------------
     if ($this->_authenticate($username, $password)) {
         if ($this->blog['blog_id'] != $blogid) {
             $this->classApiServer->apiSendError(100, $this->registry->class_localization->words['blogger_error_3']);
             exit;
         }
         //-----------------------------------------
         // return
         //-----------------------------------------
         if (!$this->_compilePost($content['description'], $publish)) {
             $this->classApiServer->apiSendError(100, $this->error);
             exit;
         }
         $this->registry->DB()->insert('blog_entries', $this->entry);
         $entry_id = $this->registry->DB()->getInsertId();
         $this->registry->blog_std->rebuildBlog($this->blog['blog_id']);
         //-----------------------------------------
         // Load and config POST class
         //-----------------------------------------
         require_once IPSLib::getAppDir('blog') . "/sources/lib/lib_post.php";
         require_once IPSLib::getAppDir('blog') . "/sources/lib/entry_new_entry.php";
         $this->lib_post = new postFunctions($this->registry);
         $this->lib_post->blog =& $this->blog;
         //-------------------------------------------------
         // If the entry is published, run the Blog tracker and pings
         //-------------------------------------------------
         $this->lib_post->blogTracker($entry_id, $this->entry['entry_name'], $this->entry['entry']);
         $this->lib_post->blogPings($entry_id, $this->entry);
         //-------------------------------------------------
         // Update the Blog stats
         //-------------------------------------------------
         $r = $this->registry->cache()->getCache('blog_stats');
         $r['blog_stats']['stats_num_entries']++;
         $this->registry->cache()->setCache('blog_stats', $r, array('array' => 1, 'deletefirst' => 0, 'donow' => 1));
         $this->classApiServer->apiSendReply($entry_id);
         exit;
     } else {
         $this->classApiServer->apiSendError(100, $this->error);
         exit;
     }
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:59,代码来源:server_metaweblog.php

示例10: __construct

 /**
  * Constructor
  *
  * @access	public
  * @param	object		Registry object
  * @param	object		Parent bbcode class
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry, $_parent = null)
 {
     /* Make object */
     $this->registry = $registry;
     $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();
     $this->_parentBBcode = $_parent;
     /* Retrieve bbcode data */
     $bbcodeCache = $this->cache->getCache('bbcode');
     $this->_bbcode = $bbcodeCache[$this->currentBbcode];
 }
开发者ID:mover5,项目名称:imobackup,代码行数:25,代码来源:defaults.php

示例11: __construct

 /**
  * CONSTRUCTOR
  *
  * @param	object	Registry
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry)
 {
     /* Make registry objects */
     $this->registry = $registry;
     $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();
     /* Just to be sure */
     $this->setBypassPermissionCheck(false);
     /* Just for now */
     $this->settings['su_parse_url'] = 1;
     $this->settings['tc_parse_tags'] = 1;
     $this->settings['tc_parse_names'] = 1;
 }
开发者ID:ConnorChristie,项目名称:GrabViews,代码行数:25,代码来源:status.php

示例12: __construct

 /**
  * Constructor
  *
  * @param	object		Registry object
  * @param	string		Parsing method to use
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry, $method = 'normal')
 {
     /* Make object */
     $this->registry = $registry;
     $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();
     $this->pre_edit_parse_method = $method;
     /* Initialize our bbcode class */
     $this->_loadClasses();
     /* And some default properties */
     $this->bypass_badwords = $this->memberData ? intval($this->memberData['g_bypass_badwords']) : 0;
     $this->strip_quotes = $this->settings['strip_quotes'];
 }
开发者ID:ConnorChristie,项目名称:GrabViews-Live,代码行数:26,代码来源:han_parse_bbcode.php

示例13: __construct

 /**
  * Method constructor
  *
  * @access	public
  * @param	object		Registry Object
  * @param	array 		Array of settings:
  *						[ 'sqlPrimaryID'	(the SQL table field for the item ID)
  *						  'sqlParentID'  	(the SQL table field for the parent ID)
  *						  'sqlFolderFlag'	(the SQL table field that tells if the row is a folder or not *Optional)
  *						  'sqlTitle'		(the SQL table field for the item title)
  *						  'sqlOrder'		(the SQL table field(s) to order on or by)
  *						  'sqlTable'		(the SQL table name)
  *						  'sqlWhere'		(Any additional 'where' information *Optional) ]
  * @return	void
  */
 public function __construct(ipsRegistry $registry, $settings)
 {
     /* Make object */
     $this->registry = $registry;
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->request =& $this->registry->fetchRequest();
     $this->member = $this->registry->member();
     $this->memberData =& $this->registry->member()->fetchMemberData();
     $this->cache = $this->registry->cache();
     $this->caches =& $this->registry->cache()->fetchCaches();
     /* Sort out settings */
     $this->_sqlPrimaryID = isset($settings['sqlPrimaryID']) ? $settings['sqlPrimaryID'] : '';
     $this->_sqlParentID = isset($settings['sqlParentID']) ? $settings['sqlParentID'] : '';
     $this->_sqlFolderFlag = isset($settings['sqlFolderFlag']) ? $settings['sqlFolderFlag'] : '';
     $this->_sqlTitle = isset($settings['sqlTitle']) ? $settings['sqlTitle'] : '';
     $this->_sqlOrder = isset($settings['sqlOrder']) ? $settings['sqlOrder'] : '';
     $this->_sqlTable = isset($settings['sqlTable']) ? $settings['sqlTable'] : '';
     $this->_sqlWhere = isset($settings['sqlWhere']) ? $settings['sqlWhere'] : '';
     /* Build the tiers */
     $this->_buildTiers();
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:37,代码来源:recursiveTiers.php

示例14: init

 /**
  * Initialize class
  *
  * @access	public
  * @return	void
  */
 public function init()
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     require_once IPS_PATH_CUSTOM_LOGIN . '/login_core.php';
     require_once IPS_PATH_CUSTOM_LOGIN . '/login_interface.php';
     $classes = array();
     $configs = array();
     $methods = array();
     //-----------------------------------------
     // Do we have cache?
     //-----------------------------------------
     $cache = $this->registry->cache()->getCache('login_methods');
     if (is_array($cache) and count($cache)) {
         foreach ($cache as $login_method) {
             if ($login_method['login_enabled']) {
                 if (file_exists(IPS_PATH_CUSTOM_LOGIN . '/' . $login_method['login_folder_name'] . '/auth.php')) {
                     $classes[$login_method['login_order']] = IPS_PATH_CUSTOM_LOGIN . '/' . $login_method['login_folder_name'] . '/auth.php';
                     $configs[$login_method['login_order']] = IPS_PATH_CUSTOM_LOGIN . '/' . $login_method['login_folder_name'] . '/conf.php';
                     $this->login_methods[$login_method['login_order']] = $login_method;
                     $this->login_confs[$login_method['login_order']] = array();
                     if (file_exists($configs[$login_method['login_order']])) {
                         $LOGIN_CONF = array();
                         require $configs[$login_method['login_order']];
                         $this->login_confs[$login_method['login_order']] = $LOGIN_CONF;
                     }
                     $classname = "login_" . $login_method['login_folder_name'];
                     require_once $classes[$login_method['login_order']];
                     $this->modules[$login_method['login_order']] = new $classname($this->registry, $login_method, $this->login_confs[$login_method['login_order']]);
                 }
             }
         }
     } else {
         $this->DB->build(array('select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1'));
         $this->DB->execute();
         while ($login_method = $this->DB->fetch()) {
             if (file_exists(IPS_PATH_CUSTOM_LOGIN . '/' . $login_method['login_folder_name'] . '/auth.php')) {
                 $classes[$login_method['login_order']] = IPS_PATH_CUSTOM_LOGIN . '/' . $login_method['login_folder_name'] . '/auth.php';
                 $configs[$login_method['login_order']] = IPS_PATH_CUSTOM_LOGIN . '/' . $login_method['login_folder_name'] . '/conf.php';
                 $this->login_methods[$login_method['login_order']] = $login_method;
                 if (file_exists($configs[$login_method['login_order']])) {
                     $LOGIN_CONF = array();
                     require $configs[$login_method['login_order']];
                     $this->login_confs[$login_method['login_order']] = $LOGIN_CONF;
                 }
                 $classname = "login_" . $login_method['login_folder_name'];
                 require_once $classes[$login_method['login_order']];
                 $this->modules[$login_method['login_order']] = new $classname($this->registry, $login_method, $this->login_confs[$login_method['login_order']]);
             }
         }
     }
     //-----------------------------------------
     // Got nothing?
     //-----------------------------------------
     if (!count($classes)) {
         $login_method = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'login_methods', 'where' => "login_folder_name='internal'"));
         if ($login_method['login_id']) {
             $classes[0] = IPS_PATH_CUSTOM_LOGIN . '/internal/auth.php';
             $this->login_methods[0] = $login_method;
             $this->login_confs[0] = array();
             $classname = "login_internal";
             require_once $classes[0];
             $this->modules[0] = new $classname($this->registry, $login_method, array());
         }
     }
     //-----------------------------------------
     // If we're here, there is no enabled login
     // handler and internal was deleted
     //-----------------------------------------
     if (!count($this->modules)) {
         $this->registry->output->showError($this->lang->words['no_login_methods'], 4000);
     }
     //-----------------------------------------
     // Pass of some data
     //-----------------------------------------
     foreach ($this->modules as $k => $obj_reference) {
         $obj_reference->is_admin_auth = $this->is_admin_auth;
         $obj_reference->login_method = $this->login_methods[$k];
         $obj_reference->login_conf = $this->login_confs[$k];
     }
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:88,代码来源:han_login.php

示例15: __construct

 /**
  * Constructor
  *
  * @access	public
  * @param	object		Registry object
  * @return	void
  */
 public function __construct(ipsRegistry $registry)
 {
     /* Make object */
     $this->registry = $registry;
     $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();
     //require_once( IPS_ROOT_PATH . 'sources/interfaces/interface_bbcode.php' );
     $_NOW = IPSDebug::getMemoryDebugFlag();
     $this->initOurBbcodes();
     IPSDebug::setMemoryDebugFlag("BBCodes initialized", $_NOW);
     /* Check for emoticons */
     if (!is_array($this->caches['emoticons']) or !count($this->caches['emoticons'])) {
         $this->cache->rebuildCache('emoticons', 'global');
     }
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:28,代码来源:core.php


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