public function getPlugin($class)
{
$found = [];
foreach ($this->_plugins as $plugin) {
$type = get_class($plugin);
if ($class == $type) {
$found[] = $plugin;
}
}
switch (count($found)) {
case 0:
return false;
case 1:
return $found[0];
default:
return $found;
}
}