1
0
Fork 0

Add IOInterface methods

pull/8528/head
Jordi Boggiano 2020-01-13 13:36:09 +01:00
parent 23359f2db6
commit a6176a7beb
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 21 additions and 11 deletions

View File

@ -81,6 +81,24 @@ interface IOInterface extends LoggerInterface
*/
public function writeError($messages, $newline = true, $verbosity = self::NORMAL);
/**
* Writes a message to the output, without formatting it.
*
* @param string|array $messages The message as an array of lines or a single string
* @param bool $newline Whether to add a newline or not
* @param int $verbosity Verbosity level from the VERBOSITY_* constants
*/
public function writeRaw($messages, $newline = true, $verbosity = self::NORMAL);
/**
* Writes a message to the error output, without formatting it.
*
* @param string|array $messages The message as an array of lines or a single string
* @param bool $newline Whether to add a newline or not
* @param int $verbosity Verbosity level from the VERBOSITY_* constants
*/
public function writeErrorRaw($messages, $newline = true, $verbosity = self::NORMAL);
/**
* Overwrites a previous message to the output.
*

View File

@ -112,18 +112,10 @@ class ProcessExecutor
return;
}
if (method_exists($this->io, 'writeRaw')) {
if (Process::ERR === $type) {
$this->io->writeErrorRaw($buffer, false);
} else {
$this->io->writeRaw($buffer, false);
}
if (Process::ERR === $type) {
$this->io->writeErrorRaw($buffer, false);
} else {
if (Process::ERR === $type) {
$this->io->writeError($buffer, false);
} else {
$this->io->write($buffer, false);
}
$this->io->writeRaw($buffer, false);
}
}