Refactored command outputs
This commit is contained in:
parent
07b2e434a5
commit
580f7ae28a
3 changed files with 23 additions and 21 deletions
|
|
@ -248,4 +248,24 @@ EOT;
|
|||
protected function getTmpDir() {
|
||||
return $this->tmpDir;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write Propel output as summary.
|
||||
*
|
||||
* @param $taskname A task name
|
||||
*/
|
||||
protected function summary($output, $taskname) {
|
||||
foreach (explode("\n", $this->buffer) as $line) {
|
||||
if (false !== strpos($line, '[' . $taskname . ']')) {
|
||||
$arr = preg_split('#\[' . $taskname . '\] #', $line);
|
||||
$info = $arr[1];
|
||||
|
||||
if ('"' === $info[0]) {
|
||||
$info = sprintf('<info>%s</info>', $info);
|
||||
}
|
||||
|
||||
$output->writeln($info);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue