當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Plugins::Instance方法代碼示例

本文整理匯總了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));
 }
開發者ID:JiffSoft,項目名稱:FacePress,代碼行數:11,代碼來源:plugins.php

示例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);
}
開發者ID:JiffSoft,項目名稱:FacePress,代碼行數:22,代碼來源:debugger.php

示例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';
開發者ID:JiffSoft,項目名稱:FacePress,代碼行數:30,代碼來源:load.php


注:本文中的Plugins::Instance方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。