本文整理汇总了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();