本文整理汇总了PHP中Plugins::Instance方法的典型用法代码示例。如果您正苦于以下问题:PHP Plugins::Instance方法的具体用法?PHP Plugins::Instance怎么用?PHP Plugins::Instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugins
的用法示例。
在下文中一共展示了Plugins::Instance方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: InstallPlugin
public static function InstallPlugin($_plugin_yaml_file)
{
$this_plugin = Spyc::YAMLLoad(BASEDIR . '/fpb-content/plugins/' . $_plugin_yaml_file);
foreach (Plugins::Instance()->_plugin_data as $plugin) {
if (strtoupper($plugin['PluginName']) == strtoupper($this_plugin['PluginName'])) {
return;
}
}
array_push(Plugins::Instance()->_plugin_data, $this_plugin);
FPBDatabase::Instance()->SetConfigElement('Plugins', serialize(Plugins::Instance()->_plugin_data));
}
示例2: FPB_Debugger_RenderDebugDiv
function FPB_Debugger_RenderDebugDiv()
{
global $smarty;
$var_dump = print_r($_SESSION, true);
$var_dump .= print_r($_REQUEST, true);
$var_dump .= print_r($_COOKIE, true);
$plugins = print_r(Plugins::Instance()->PluginData(), true);
$user = print_r(FPBAuth::GetInstance()->GetUser(), true);
$debug_contents = <<<HTML
<hr/>
<pre>
{$var_dump}
</pre>
<pre>
{$plugins}
</pre>
<pre>
{$user}
</pre>
HTML;
$smarty->assign('debug', $debug_contents);
}
示例3: FacebookHelper
/**
* @package FacePress
* @version $Id$
* @copyright (c) 2010 JiffSoft
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License v3
*/
// load up the required classes
require BASEDIR . '/fpb-includes/smarty/Smarty.class.php';
require BASEDIR . '/fpb-includes/auth.php';
require BASEDIR . '/fpb-includes/database.php';
require BASEDIR . '/fpb-includes/functions.php';
require BASEDIR . '/fpb-includes/fbhelper.php';
require BASEDIR . '/fpb-includes/spyc.php';
require BASEDIR . '/fpb-includes/plugins.php';
Plugins::Instance()->Load();
$config = FPBDatabase::Instance()->GetConfigArray();
/**
* The 'core_loaded' hook is executed after we load up the classes and templates,
* prior to any other code being executed
* @see Hooks
*/
Plugins::RunHook('core_loaded');
$fb_helper = new FacebookHelper();
FPBAuth::GetInstance()->CheckFBStatus();
/**
* The 'auth_completed' hook is executed after the authentication module has run
* @see Hooks
*/
Plugins::RunHook('auth_completed');
$site_theme = strlen($config["Theme"]) > 0 ? $config["Theme"] : 'coolblue';