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


PHP vB_Bitfield_Builder::build_datastore方法代码示例

本文整理汇总了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';
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:init.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;
 }
开发者ID:holandacz,项目名称:nb4,代码行数:15,代码来源:class_bitfield_builder.php

示例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;
 }
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:23,代码来源:class_bitfield_builder.php


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