本文整理汇总了PHP中vBulletinHook::init方法的典型用法代码示例。如果您正苦于以下问题:PHP vBulletinHook::init方法的具体用法?PHP vBulletinHook::init怎么用?PHP vBulletinHook::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vBulletinHook
的用法示例。
在下文中一共展示了vBulletinHook::init方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
}
$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';
$hookobj =& vBulletinHook::init();
$vbulletin->pluginlist = '';
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:39, Wed May 30th 2012
|| # CVS: $RCSfile$ - $Revision: 39862 $
|| ####################################################################
\*======================================================================*/
示例2: fetch_hookusage
/**
* Fetches the array of hooks that have been used.
*/
function fetch_hookusage()
{
$obj =& vBulletinHook::init();
return $obj->hookusage;
}
示例3: _handlePlugins
/**
* Handles importing of plugins into memory for a given project.
* @param VDE_Project
*/
protected function _handlePlugins($project)
{
$hookObj = vBulletinHook::init();
foreach ($project->getPlugins() as $hook => $code) {
if ($hook == 'init_startup') {
$this->_initCode .= "\n{$code}\n";
} else {
$hookObj->pluginlist[$hook] .= "\n" . $code . "\n";
}
}
}
示例4: registerHook
/**
* Adds phpcode to a given hook as if a plugin containing that code was
* defined for that hook.
*
* @param string $hook
* @param string $phpcode
*/
private function registerHook($hook, $phpcode)
{
$list =& vBulletinHook::init()->pluginlist;
// Make sure the key exists, even if as an empty string
if (empty($list[$hook])) {
$list[$hook] = '';
}
// Append new code
$list[$hook] .= "\n{$phpcode}";
}
示例5: goldbrick_inject_plugin
/**
* Injects plugin code at run-time.
*
* @param string Hook name
* @param string Code to inject
*/
function goldbrick_inject_plugin($hook, $code)
{
$hook_obj =& vBulletinHook::init();
if (!isset($hook_obj->pluginlist[$hook])) {
$hook_obj->pluginlist[$hook] = $code;
} else {
$hook_obj->pluginlist[$hook] .= "\n{$code}\n";
}
}