Skip to content
PHP Ecosystem
Explore

ComposerIoWriter

API reference › Scaffold › Console › ComposerIoWriter

final readonly classPHPForge\Scaffold\Console\ComposerIoWriter
ImplementsOutputWriter
Sourcesrc/Console/ComposerIoWriter.php

Adapts Composer IO to OutputWriter, so the Composer-free scaffold core can report through a Composer run.

MethodDescriptionDefined by
__construct()Creates a writer for Composer IO.ComposerIoWriter
writeStderr()Writes $message with IOInterface::writeError().ComposerIoWriter
writeStdout()Writes $message with IOInterface::write().ComposerIoWriter
public function __construct(Composer\IO\IOInterface $io)

Creates a writer for Composer IO.

Parameters

ParameterTypeDescription
$ioComposer\IO\IOInterfaceComposer IO that receives the messages.
public function writeStderr(string $message): void

Writes $message with IOInterface::writeError().

Parameters

ParameterTypeDescription
$messagestringMessage without a trailing newline; the writer appends one.
public function writeStdout(string $message): void

Writes $message with IOInterface::write().

Parameters

ParameterTypeDescription
$messagestringMessage without a trailing newline; the writer appends one.