本文整理汇总了PHP中object::DB方法的典型用法代码示例。如果您正苦于以下问题:PHP object::DB方法的具体用法?PHP object::DB怎么用?PHP object::DB使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类object
的用法示例。
在下文中一共展示了object::DB方法的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;
}
}
示例2: onMerge
/**
* This method is called after a member's account has been merged into another member's account
*
* @access public
* @param array $member Member account being kept
* @param array $member2 Member account being removed
* @return void
**/
public function onMerge($member, $member2)
{
IPSDebug::addLogMessage("Markers init done:", 'merge', $member);
if ($this->registry->DB()->checkForTable('cal_events')) {
$this->registry->DB()->update('cal_events', array('event_member_id' => intval($member['member_id'])), "event_member_id=" . $member2['member_id']);
}
}
示例3: __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->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
}
示例4: __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();
}
示例5: __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();
}
示例6: __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 = '';
}
}
示例7: __construct
/**
* Method constructor
*
* If you pass false as the key, it will not save out the imported GUIDs
* @access public
* @param string URL of feed
* @param string Unique key for the app/page importing (blog-{member_id} for example)
* @return @e void
*
*/
public function __construct($url, $key = false)
{
$this->_url = trim($url);
$this->_key = trim($key);
/* Core classes */
if (!is_object($this->registry)) {
$this->registry = ipsRegistry::instance();
$this->DB = $this->registry->DB();
}
/* Load RSS Class */
if (!is_object($this->_rssClass)) {
$classToLoad = IPSLib::loadLibrary(IPS_KERNEL_PATH . 'classRss.php', 'classRss');
$this->_rssClass = new $classToLoad();
$this->_rssClass->rss_max_show = 100;
$this->_rssClass->orig_doc_type = IPS_DOC_CHAR_SET;
}
ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_global'), 'core');
/* Are we checking for external links */
$rels = array();
$rel = '';
if (ipsRegistry::$settings['posts_add_nofollow']) {
$rels[] = "nofollow";
}
if (ipsRegistry::$settings['links_external']) {
$rels[] = "external";
}
if (count($rels)) {
$rel = " rel='" . implode(' ', $rels) . "'";
}
$this->_settings['LinkBack'] = "<a href=\"{url}\" {$rel}>" . $this->registry->getClass('class_localization')->words['_rssimportsource'] . "</a>";
/* Reset class */
$this->_reset();
}
示例8: __construct
/**
* Constructor
*
* @access public
* @param object ipsRegistry
* @return void
*/
public function __construct(ipsRegistry $registry)
{
$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();
$plugin = $this->settings['bot_antispam_type'];
if (!file_exists(IPS_KERNEL_PATH . 'classCaptchaPlugin/' . $plugin . '.php')) {
$plugin = 'default';
}
require_once IPS_KERNEL_PATH . 'classCaptchaPlugin/' . $plugin . '.php';
$this->_plugInClass = new captchaPlugIn($registry);
}
示例9: __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();
}
示例10: __construct
/**
* Constructor
*
* @param object ipsRegistry reference
* @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();
//-----------------------------------------
// Do not set member, memberData or lang
// Causes issues with SSO implementations
//-----------------------------------------
}
示例11: __construct
/**
* Constructor
*
* @param object Registry Object
*/
public function __construct(ipsRegistry $registry)
{
$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();
/* Settings */
$this->gd_version = $this->settings['gd_version'];
$this->path_background = DOC_IPS_ROOT_PATH . 'public/style_captcha/captcha_backgrounds';
$this->path_fonts = DOC_IPS_ROOT_PATH . 'public/style_captcha/captcha_fonts';
}
示例12: __construct
/**
* Constructor
*
* @access public
* @param object Registry Object
* @return void
*/
public function __construct(ipsRegistry $registry)
{
$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();
/* Settings */
$this->public_key = trim($this->settings['recaptcha_public_key']);
$this->private_key = trim($this->settings['recaptcha_private_key']);
$this->useSSL = $this->settings['logins_over_https'];
}
示例13: __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'));
}
示例14: __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];
}
示例15: __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'];
}