本文整理汇总了PHP中Piwik\Tracker::getPluginsNotToLoad方法的典型用法代码示例。如果您正苦于以下问题:PHP Tracker::getPluginsNotToLoad方法的具体用法?PHP Tracker::getPluginsNotToLoad怎么用?PHP Tracker::getPluginsNotToLoad使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\Tracker
的用法示例。
在下文中一共展示了Tracker::getPluginsNotToLoad方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadTrackerPlugins
/**
* @return array names of plugins that have been loaded
*/
public function loadTrackerPlugins()
{
$this->unloadPlugins();
$pluginsTracker = PiwikConfig::getInstance()->Plugins_Tracker['Plugins_Tracker'];
if (empty($pluginsTracker)) {
return array();
}
$pluginsTracker = array_diff($pluginsTracker, Tracker::getPluginsNotToLoad());
$this->doNotLoadAlwaysActivatedPlugins();
$this->loadPlugins($pluginsTracker);
return $pluginsTracker;
}
示例2: loadTrackerPlugins
/**
* @return array names of plugins that have been loaded
*/
public function loadTrackerPlugins()
{
$this->unloadPlugins();
$pluginsTracker = PiwikConfig::getInstance()->Plugins_Tracker['Plugins_Tracker'];
if (empty($pluginsTracker)) {
return array();
}
$pluginsTracker = array_diff($pluginsTracker, Tracker::getPluginsNotToLoad());
if (defined('PIWIK_TEST_MODE')) {
$pluginsTracker = array_intersect($pluginsTracker, $this->getPluginsToLoadDuringTests());
}
$this->doNotLoadAlwaysActivatedPlugins();
$this->loadPlugins($pluginsTracker);
return $pluginsTracker;
}
示例3: loadTrackerPlugins
/**
* @return array names of plugins that have been loaded
*/
public function loadTrackerPlugins()
{
$cache = new PersistentCache('PluginsTracker');
if ($cache->has()) {
$pluginsTracker = $cache->get();
} else {
$this->unloadPlugins();
$this->loadActivatedPlugins();
$pluginsTracker = array();
foreach ($this->loadedPlugins as $pluginName => $plugin) {
if ($this->isTrackerPlugin($plugin)) {
$pluginsTracker[] = $pluginName;
}
}
if (!empty($pluginsTracker)) {
$cache->set($pluginsTracker);
}
}
$this->unloadPlugins();
if (empty($pluginsTracker)) {
return array();
}
$pluginsTracker = array_diff($pluginsTracker, Tracker::getPluginsNotToLoad());
$this->doNotLoadAlwaysActivatedPlugins();
$this->loadPlugins($pluginsTracker);
return $pluginsTracker;
}
示例4: initCorePiwikInTrackerMode
/**
* Used to initialize core Piwik components on a piwik.php request
* Eg. when cache is missed and we will be calling some APIs to generate cache
*/
public static function initCorePiwikInTrackerMode()
{
if (!empty($GLOBALS['PIWIK_TRACKER_MODE']) && self::$initTrackerMode === false) {
self::$initTrackerMode = true;
require_once PIWIK_INCLUDE_PATH . '/core/Loader.php';
require_once PIWIK_INCLUDE_PATH . '/core/Option.php';
$access = Access::getInstance();
$config = Config::getInstance();
try {
$db = Db::get();
} catch (Exception $e) {
Db::createDatabaseObject();
}
$pluginsManager = \Piwik\Plugin\Manager::getInstance();
$pluginsToLoad = Config::getInstance()->Plugins['Plugins'];
$pluginsForcedNotToLoad = Tracker::getPluginsNotToLoad();
$pluginsToLoad = array_diff($pluginsToLoad, $pluginsForcedNotToLoad);
$pluginsToLoad = array_merge($pluginsToLoad, Tracker::getPluginsToLoad());
$pluginsManager->loadPlugins($pluginsToLoad);
}
}