本文整理汇总了PHP中vB_Bitfield_Builder::build_datastore方法的典型用法代码示例。如果您正苦于以下问题:PHP vB_Bitfield_Builder::build_datastore方法的具体用法?PHP vB_Bitfield_Builder::build_datastore怎么用?PHP vB_Bitfield_Builder::build_datastore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vB_Bitfield_Builder
的用法示例。
在下文中一共展示了vB_Bitfield_Builder::build_datastore方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$vbulletin->datastore->fetch($specialtemplates);
}
} else {
if (VB_AREA == 'Install') {
// load it up but don't actually call fetch, we need the ability to overwrite fields.
$datastore_class = !empty($vbulletin->config['Datastore']['class']) ? $vbulletin->config['Datastore']['class'] : 'vB_Datastore';
if ($datastore_class != 'vB_Datastore') {
require_once DIR . '/includes/class_datastore.php';
}
$vbulletin->datastore = new $datastore_class($vbulletin, $db);
}
}
// ## Load latest bitfields, overwrite datastore versions (if they exist)
// ## (so latest upgrade script can access any new permissions)
require_once DIR . '/includes/class_bitfield_builder.php';
if (vB_Bitfield_Builder::build_datastore() !== false) {
$myobj =& vB_Bitfield_Builder::init();
require_once DIR . '/includes/functions.php';
require_once DIR . '/includes/functions_misc.php';
foreach (array_keys($myobj->datastore) as $group) {
$vbulletin->{'bf_' . $group} =& $myobj->datastore["{$group}"];
foreach (array_keys($myobj->datastore["{$group}"]) as $subgroup) {
$vbulletin->{'bf_' . $group . '_' . $subgroup} =& $myobj->datastore["{$group}"]["{$subgroup}"];
}
}
} else {
trigger_error('Error Building Bitfields', E_USER_ERROR);
}
}
// setup an empty hook class in case we run some of the main vB code
require_once DIR . '/includes/class_hook.php';
示例2: save
/**
* Saves Data into database
*
* @return boolean
*/
function save($dbobject)
{
$obj =& vB_Bitfield_Builder::init();
if (vB_Bitfield_Builder::build_datastore() === false) {
return false;
}
// save
build_datastore('bitfields', serialize($obj->datastore), 1);
return true;
}
示例3: save
/**
* Saves Data into database
*
* @return boolean
*/
static function save()
{
global $vbulletin;
$obj =& vB_Bitfield_Builder::init();
if (vB_Bitfield_Builder::build_datastore() === false) {
return false;
}
// Update registry
foreach (array_keys($obj->datastore) as $group) {
$vbulletin->{'bf_' . $group} =& $obj->datastore["{$group}"];
foreach (array_keys($obj->datastore["{$group}"]) as $subgroup) {
$vbulletin->{'bf_' . $group . '_' . $subgroup} =& $obj->datastore["{$group}"]["{$subgroup}"];
}
}
// save
build_datastore('bitfields', serialize($obj->datastore), 1);
return true;
}