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


PHP Plugins::load_active方法代碼示例

本文整理匯總了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.
開發者ID:psaintlaurent,項目名稱:Habari,代碼行數:31,代碼來源:index.php

示例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();
 }
開發者ID:habari,項目名稱:tests,代碼行數:28,代碼來源:bootstrap.php


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