private function loadBuilders()
{
$list = array();
$builderDirectory = __DIR__ . DIRECTORY_SEPARATOR . 'Builders';
$excluded = array('Builder.php', '.', '..');
if (!is_dir($builderDirectory)) {
throw new \Exception('Can\'t open builder directory, maybe it doesn\'t exists?');
}
$handle = opendir($builderDirectory);
if (!$handle) {
throw new \Exception('Can\'t open builder directory, check the permissions!');
}
while (($entry = readdir($handle)) !== false) {
if (!in_array($entry, $excluded)) {
$list[] = strtolower(substr($entry, 0, -11));
}
}
return $list;
}