本文整理匯總了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());
}
}