public function generateClasses()
{
$tmp = $this->getJarves()->getCacheDir() . '/';
if (!file_exists($tmp . 'propel')) {
self::writeConfig();
self::writeBuildProperties();
self::collectSchemas();
}
$platform = $this->getJarves()->getSystemConfig()->getDatabase()->getMainConnection()->getType();
$platform = ucfirst($platform) . 'Platform';
$input = new ArrayInput(array('--config-dir' => $tmp . 'propel/', '--schema-dir' => $tmp . 'propel/', '--output-dir' => $tmp . 'propel/build/classes/', '--platform' => $platform, '--verbose' => 'vvv'));
$command = new ModelBuildCommand();
$command->getDefinition()->addOption(new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, ''));
$output = new StreamOutput(fopen('php://memory', 'rw'));
$command->run($input, $output);
$content = stream_get_contents($output->getStream());
$content .= self::moveClasses();
return $content;
}