Nextcloud PHP API (master)

OutputFormat : string
in package

Output format for a command.

The value can be queried in the __invoke method of a command.

#[AsCommand(
    name: 'app:user:created',
    supportsOutputFormat: true,
)
class CreateUserCommand {
    public function __invoke(
        #[Option(description: "The username of the user")] string $userId,
        IOutput $output,
        OutputFormat $outputFormat,
    ): ExitCode {
        // ...
        return ExitCode::Success;
    }
}
Tags
since
35.0.0

Table of Contents

Cases

Json  = 'json'
JsonPretty  = 'json_pretty'
Plain  = 'plain'

Cases

On this page

Search results