本文整理汇总了PHP中Piwik\Tracker::setPluginsNotToLoad方法的典型用法代码示例。如果您正苦于以下问题:PHP Tracker::setPluginsNotToLoad方法的具体用法?PHP Tracker::setPluginsNotToLoad怎么用?PHP Tracker::setPluginsNotToLoad使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\Tracker
的用法示例。
在下文中一共展示了Tracker::setPluginsNotToLoad方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadTrackerPlugins
protected function loadTrackerPlugins(Request $request)
{
// Adding &dp=1 will disable the provider plugin, if token_auth is used (used to speed up bulk imports)
$disableProvider = $request->getParam('dp');
if (!empty($disableProvider)) {
Tracker::setPluginsNotToLoad(array('Provider'));
}
try {
$pluginsTracker = \Piwik\Plugin\Manager::getInstance()->loadTrackerPlugins();
Common::printDebug("Loading plugins: { " . implode(", ", $pluginsTracker) . " }");
} catch (Exception $e) {
Common::printDebug("ERROR: " . $e->getMessage());
}
}
示例2: loadTrackerPlugins
protected function loadTrackerPlugins(Request $request)
{
// Adding &dp=1 will disable the provider plugin, if token_auth is used (used to speed up bulk imports)
$disableProvider = $request->getParam('dp');
if (!empty($disableProvider) && $request->isAuthenticated()) {
Tracker::setPluginsNotToLoad(array('Provider'));
}
try {
$pluginsTracker = Config::getInstance()->Plugins_Tracker['Plugins_Tracker'];
if (count($pluginsTracker) > 0) {
$pluginsTracker = array_diff($pluginsTracker, self::getPluginsNotToLoad());
\Piwik\Plugin\Manager::getInstance()->doNotLoadAlwaysActivatedPlugins();
\Piwik\Plugin\Manager::getInstance()->loadPlugins($pluginsTracker);
Common::printDebug("Loading plugins: { " . implode(",", $pluginsTracker) . " }");
}
} catch (Exception $e) {
Common::printDebug("ERROR: " . $e->getMessage());
}
}