Fixed PhingCommand + added a writeSection() method
This commit is contained in:
parent
3f49f58e8c
commit
4f1cc4ce05
1 changed files with 14 additions and 1 deletions
|
|
@ -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),
|
||||
'',
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue