本文整理汇总了PHP中db_factory::instance方法的典型用法代码示例。如果您正苦于以下问题:PHP db_factory::instance方法的具体用法?PHP db_factory::instance怎么用?PHP db_factory::instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类db_factory
的用法示例。
在下文中一共展示了db_factory::instance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
function setUp()
{
$this->db =& db_factory :: instance();
$this->db_table_test =& db_table_factory :: instance('test1');
$this->_clean_up();
}
示例2: setUp
function setUp()
{
parent :: setUp();
$this->db =& db_factory :: instance();
$tree =& tree :: instance();
$values['identifier'] = 'root';
$this->node_id_root = $tree->create_root_node($values, false, true);
$values['identifier'] = 'ru';
$values['object_id'] = 1;
$this->node_id_ru = $tree->create_sub_node($this->node_id_root, $values);
$values['identifier'] = 'document';
$values['object_id'] = 10;
$this->node_id_document = $tree->create_sub_node($this->node_id_ru, $values);
$values['identifier'] = 'doc1';
$values['object_id'] = 20;
$this->node_id_doc1 = $tree->create_sub_node($this->node_id_ru, $values);
$values['identifier'] = 'doc2';
$values['object_id'] = 30;
$this->node_id_doc2 = $tree->create_sub_node($this->node_id_ru, $values);
}
示例3: setUp
function setUp()
{
$this->db =& db_factory::instance();
$this->stats_uri = new stats_uri_self_test_version($this);
$this->stats_uri->stats_uri();
$this->_clean_up();
}
示例4: setUp
function setUp()
{
$this->report = new stats_referers_report();
$this->db =& db_factory :: instance();
$this->_clean_up();
}
示例5: setUp
function setUp()
{
$this->db = db_factory::instance();
debug_mock::init($this);
$this->driver = new materialized_path_driver_test_version();
$this->_clean_up();
}
示例6: db_table
function db_table()
{
$this->_db_table_name = $this->_define_db_table_name();
$this->_columns = $this->_define_columns();
$this->_constraints = $this->_define_constraints();
$this->_db =& db_factory::instance();
}
示例7: setUp
function setUp()
{
$this->db = db_factory::instance();
debug_mock::init($this);
$this->driver = new nested_sets_driver_test_version();
$this->_clean_up();
}
示例8: setUp
function setUp()
{
$this->db =& db_factory::instance();
$this->stats_referer = new stats_referer_self_test_version($this);
$this->stats_referer->stats_referer();
$this->_clean_up();
}
示例9: instance
function full_text_search()
{
$this->db =& db_factory :: instance();
$this->indexer =& new full_text_indexer();
$this->use_boolean_mode = $this->_check_boolean_mode();
}
示例10: setUp
function setUp()
{
$this->db =& db_factory :: instance();
$this->links_manager =& new links_manager();
$this->_clean_up();
}
示例11: setUp
function setUp()
{
$this->db =& db_factory::instance();
$this->_clean_up();
$this->_init_site_object();
$this->object->set_attribute('controller_name', 'site_object_controller');
$controller_id = site_object_controller::get_id('site_object_controller');
$this->object->set_attribute('controller_id', $controller_id);
debug_mock::init($this);
$user =& user::instance();
$user->_set_id(10);
$tree =& tree::instance();
$values['identifier'] = 'root';
$values['object_id'] = 100;
$this->root_node_id = $tree->create_root_node($values, false, true);
$class_id = $this->object->get_class_id();
$this->db->sql_insert('sys_site_object', array('id' => 100, 'class_id' => $class_id, 'current_version' => 1));
$values['identifier'] = 'ru';
$values['object_id'] = 1;
$this->parent_node_id = $tree->create_sub_node($this->root_node_id, $values);
$this->db->sql_insert('sys_site_object', array('id' => 1, 'class_id' => $class_id, 'current_version' => 1));
$values['identifier'] = 'document';
$values['object_id'] = 10;
$this->sub_node_id = $tree->create_sub_node($this->parent_node_id, $values);
$this->db->sql_insert('sys_site_object', array('id' => 10, 'class_id' => $class_id, 'current_version' => 1));
}
示例12: _valid_perform
function _valid_perform()
{
$object_data =& fetch_mapped_by_url();
$data = $this->_export();
$phpbb_user_data['user_rank'] = $data['rank'];
$db =& db_factory::instance();
return $db->sql_update('phpbb_users', $phpbb_user_data, array('user_id' => $object_data['id']));
}
示例13: instance
function site_object_controller_tester($class_name)
{
$this->db =& db_factory :: instance();
$this->class_name = $class_name;
parent :: LimbTestCase();
}
示例14: instance
function site_object_tester($class_name)
{
$this->db =& db_factory :: instance();
$this->class_name = $class_name;
parent :: UnitTestCase();
}
示例15: setUp
function setUp()
{
$this->db =& db_factory::instance();
$this->cart_handler =& new special_db_cart_handler($this);
$this->cart_handler->db_cart_handler(10);
$this->user = new Mockuser($this);
$this->cart_handler->setReturnReference('_get_user', $this->user);
$this->_clean_up();
}