本文整理汇总了PHP中Plugins::load_active方法的典型用法代码示例。如果您正苦于以下问题:PHP Plugins::load_active方法的具体用法?PHP Plugins::load_active怎么用?PHP Plugins::load_active使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugins
的用法示例。
在下文中一共展示了Plugins::load_active方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ignore_user_abort
$installer->upgrade_db();
}
// If we're doing unit testing, stop here
if (defined('UNIT_TEST')) {
return;
}
// if this is an asyncronous call, ignore abort.
if (isset($_GET['asyncronous']) && Utils::crypt(Options::get('guid'), $_GET['asyncronous'])) {
ignore_user_abort(true);
}
// Send the Content-Type HTTP header.
// @todo Find a better place to put this.
header('Content-Type: text/html;charset=utf-8');
// Load all the active plugins.
spl_autoload_register(array('Plugins', '_autoload'));
Plugins::load_active();
// All plugins loaded, tell the plugins.
Plugins::act('plugins_loaded');
// Start the session.
Session::init();
// Replace the $_COOKIE superglobal with an object representation
SuperGlobal::process_c();
// Initiating request handling, tell the plugins.
Plugins::act('init');
// Parse and handle the request.
Controller::parse_request();
// Run the cron jobs asyncronously.
CronTab::run_cron(true);
// Dispatch the request (action) to the matched handler.
Controller::dispatch_request();
// Flush (send) the output buffer.
示例2: run_dir
public static function run_dir($directory = null)
{
self::$run_all = true;
if (!isset($directory)) {
$directory = dirname(__FILE__);
}
spl_autoload_register(array('\\Habari\\Plugins', '_autoload'));
Plugins::load_active();
// Find unit tests, include them
$unit_tests = glob($directory . '/units/test_*.php');
$unit_tests = Plugins::filter('list_unit_tests', $unit_tests);
foreach ($unit_tests as $test) {
include $test;
}
// Find feature steps, include them
$feature_steps = glob($directory . '/steps/step_*.php');
$feature_steps = Plugins::filter('list_feature_steps', $feature_steps);
foreach ($feature_steps as $step) {
include $step;
}
// Find feature files, list them
self::$features = glob($directory . '/features/*.feature');
self::$features = Plugins::filter('list_features', self::$features);
// Find step files, list them
self::$step_files = glob($directory . '/features/step_definitions/*.php');
self::$step_files = Plugins::filter('list_step_definitions', self::$step_files);
self::run_all();
}