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


PHP plugins::setPluginsClass方法代碼示例

本文整理匯總了PHP中plugins::setPluginsClass方法的典型用法代碼示例。如果您正苦於以下問題:PHP plugins::setPluginsClass方法的具體用法?PHP plugins::setPluginsClass怎麽用?PHP plugins::setPluginsClass使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在plugins的用法示例。


在下文中一共展示了plugins::setPluginsClass方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getenv

        // foreach plugin there is
        // file = root to www path + echelon path + path to plugin from echelon path
        $file = getenv("DOCUMENT_ROOT") . PATH . 'lib/plugins/' . $plugin . '/class.php';
        // abolsute path - needed because this page is include in all levels of this site
        if (file_exists($file)) {
            require $file;
            $plugins_class["{$plugin}"] = call_user_func(array($plugin, 'getInstance'), 'name');
            //$plugin::getInstance(); // create a new instance of the plugin (whatever, eg. xlrstats) plugin
        } else {
            if ($mem->reqLevel('manage_settings')) {
                // only show the error to does who can fix it
                set_error('Unable to include the plugin file for the plugin ' . $plugin . '<br /> In the directory: ' . $file);
            }
        }
    }
    plugins::setPluginsClass($plugins_class);
}
## If auth needed on this page ##
if (!isset($auth_user_here)) {
    $auth_user_here = true;
}
// default to login required
if ($auth_user_here != false) {
    // some pages do not need auth but include this file so this following line is optional
    $mem->auth($auth_name);
}
// see if user has the right access level is not on the BL and has not got a hack counter above 3
## remove tokens from 2 pages ago to stop build up
if (!isLogin()) {
    // stop login page from using this and moving the vars
    $tokens = array();
開發者ID:Gammelbob,項目名稱:echelon,代碼行數:31,代碼來源:inc.php


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