Add IOInterface methods
parent
23359f2db6
commit
a6176a7beb
|
@ -81,6 +81,24 @@ interface IOInterface extends LoggerInterface
|
||||||
*/
|
*/
|
||||||
public function writeError($messages, $newline = true, $verbosity = self::NORMAL);
|
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.
|
* Overwrites a previous message to the output.
|
||||||
*
|
*
|
||||||
|
|
|
@ -112,19 +112,11 @@ class ProcessExecutor
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (method_exists($this->io, 'writeRaw')) {
|
|
||||||
if (Process::ERR === $type) {
|
if (Process::ERR === $type) {
|
||||||
$this->io->writeErrorRaw($buffer, false);
|
$this->io->writeErrorRaw($buffer, false);
|
||||||
} else {
|
} else {
|
||||||
$this->io->writeRaw($buffer, false);
|
$this->io->writeRaw($buffer, false);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (Process::ERR === $type) {
|
|
||||||
$this->io->writeError($buffer, false);
|
|
||||||
} else {
|
|
||||||
$this->io->write($buffer, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getTimeout()
|
public static function getTimeout()
|
||||||
|
|
Loading…
Reference in New Issue