本文整理匯總了PHP中Piwik\Plugin::findMultipleComponents方法的典型用法代碼示例。如果您正苦於以下問題:PHP Plugin::findMultipleComponents方法的具體用法?PHP Plugin::findMultipleComponents怎麽用?PHP Plugin::findMultipleComponents使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Piwik\Plugin
的用法示例。
在下文中一共展示了Plugin::findMultipleComponents方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getDimensions
/**
* Get all action dimensions that are defined by the given plugin.
* @param Plugin $plugin
* @return ActionDimension[]
* @ignore
*/
public static function getDimensions(Plugin $plugin)
{
$dimensions = $plugin->findMultipleComponents('Columns', '\\Piwik\\Plugin\\Dimension\\ActionDimension');
$instances = array();
foreach ($dimensions as $dimension) {
$instances[] = new $dimension();
}
return $instances;
}
示例2: getLocationProviders
/**
* Get all lo that are defined by the given plugin.
*
* @param Plugin $plugin
* @return LocationProvider[]
*/
protected static function getLocationProviders(Plugin $plugin)
{
$locationProviders = $plugin->findMultipleComponents('LocationProvider', 'Piwik\\Plugins\\UserCountry\\LocationProvider');
$instances = [];
foreach ($locationProviders as $locationProvider) {
$instances[] = new $locationProvider();
}
return $instances;
}