public function writeConfig()
{
$fs = $this->cacheFilesystem;
$path = $this->getJarves()->getCacheDir();
try {
$fs->mkdir('propel');
} catch (\Exception $e) {
throw new \Exception(sprintf('Can not create propel folder `%s`.', $path . '/propel'), 0, $e);
}
$config = $this->getJarves()->getSystemConfig();
$connections = self::getConnectionYml($config->getDatabase()->getMainConnection(), $config->getDatabase()->getSlaveConnections());
$yml = <<<EOF
propel:
database:
connections:
{$connections}
generator:
defaultConnection: default
connections:
- default
# objectModel:
# disableIdentifierQuoting: true
runtime:
defaultConnection: default
connections:
- default
EOF;
$fs->write('propel/propel.yml', $yml);
return true;
}