public function getProjectPaths()
{
$paths = array();
if (!file_exists($this->getEnvironmentDir())) {
$eMessage = 'The environment directory ' . $this->getEnvironmentDir() . ' doesn\'t exist. Create it ' . 'first and add some projects to it.';
throw new Exception($eMessage);
}
foreach (scandir($this->getEnvironmentDir()) as $project) {
// Exlcude dot-prefixed directories (.git was getting in the way)
if (preg_match('/^[^\\.]/', $project)) {
$path = $this->getEnvironmentDir() . '/' . $project;
if (is_dir($path) && $project != '.' && $project != '..') {
$paths[] = $project;
}
}
}
sort($paths);
return array_values($paths);
}