public findMultipleComponents ( $directoryWithinPlugin, $expectedSubclass ) |
public function findMultipleComponents($directoryWithinPlugin, $expectedSubclass)
{
$plugins = $this->getPluginsLoadedAndActivated();
$found = array();
foreach ($plugins as $plugin) {
$components = $plugin->findMultipleComponents($directoryWithinPlugin, $expectedSubclass);
if (!empty($components)) {
$found = array_merge($found, $components);
}
}
return $found;
}
/** * Get all log table instances defined by any activated and loaded plugin. The returned tables are not sorted in * any order. * @return LogTable[] */ public function getAllLogTables() { if (!isset($this->tablesCache)) { $tables = $this->pluginManager->findMultipleComponents('Tracker', 'Piwik\\Tracker\\LogTable'); $this->tablesCache = array(); foreach ($tables as $table) { $this->tablesCache[] = StaticContainer::get($table); } } return $this->tablesCache; }