Fixed PhingCommand + added a writeSection() method

This commit is contained in:
William DURAND 2011-06-22 16:45:41 +02:00
commit 4f1cc4ce05

View file

@ -160,7 +160,7 @@ abstract class PhingCommand extends ContainerAwareCommand
$returnStatus = false;
}
ob_end_flush();
ob_end_clean();
chdir($kernel->getRootDir());
@ -332,4 +332,17 @@ EOT;
throw new \RuntimeException('Propel should be configured (no database configuration found).');
}
}
/**
* Comes from the SensioGeneratorBundle.
* @see https://github.com/sensio/SensioGeneratorBundle/blob/master/Command/Helper/DialogHelper.php#L52
*/
public function writeSection(OutputInterface $output, $text, $style = 'bg=blue;fg=white')
{
$output->writeln(array(
'',
$this->getHelperSet()->get('formatter')->formatBlock($text, $style, true),
'',
));
}
}