public function dumpDefinition()
{
$def = array('info' => $this->info, 'keymap' => $this->getKeyMapDefinition());
// getting languages
$languages = array();
$lang_dir_path = $this->bundlePath . '/languages';
if (is_dir($lang_dir_path)) {
if (false !== ($d = opendir($lang_dir_path))) {
while (false !== ($f = readdir($d))) {
if (0 != strncmp('.', $f, 1) && '.amLanguage' == substr($f, -11)) {
$lang_def = $this->getLanguageDefinition(substr($f, 0, -11));
$lang_def['id'] = substr($f, 0, -11);
$languages[] = $lang_def;
}
}
closedir($d);
}
}
$def['languages'] = $languages;
$def['snippets'] = $this->getSnippets();
$def['commands'] = $this->getCommands();
$def['templates'] = $this->getTemplates();
$def['id'] = $this->name;
return $def;
}