public function declareModulesDir($basePath, $modules = null)
{
$this->_allModulesPath = null;
$this->_allPluginsPath = null;
if (is_array($basePath)) {
foreach ($basePath as $path) {
$p = realpath($path);
if ($p == '') {
throw new \Exception('Given modules dir ' . $path . 'does not exists');
}
$this->_modulesDirPath[rtrim($p, '/')] = null;
}
} else {
$p = realpath($basePath);
if ($p == '') {
throw new \Exception('Given modules dir ' . $basePath . 'does not exists');
}
$this->_modulesDirPath[rtrim($p, '/')] = $modules;
}
}