public function loadPlugins($pluginPath)
{
// strip the trailing slash if present
if (substr($pluginPath, strlen($pluginPath) - 1, 1) == '/') {
$pluginPath = substr($pluginPath, 0, strlen($pluginPath) - 1);
}
if ($handle = opendir($pluginPath)) {
while (false !== ($file = readdir($handle))) {
if ($file == '.' || $file == '..' || $file == '.svn') {
continue;
}
include_once $pluginPath . '/' . $file;
}
}
}