HasJsonOption
Provides the standard JSON output options used by DevTools commands.
Methods
Adds the standard JSON output options to the current command.
Determines whether JSON output was requested.
Determines whether pretty JSON output was requested.
Determines whether structured JSON output SHOULD be enabled implicitly.
Determines whether a boolean input option was enabled.
Adds the standard JSON output options to the current command.
protected
addJsonOption() : static
Return values
Determines whether JSON output was requested.
protected
isJsonOutput(InputInterface
$input) : bool
Description
The pretty-json flag SHALL imply JSON output.
Parameters
$input
:
InputInterface
Return values
Determines whether pretty JSON output was requested.
protected
isPrettyJsonOutput(InputInterface
$input) : bool
Parameters
$input
:
InputInterface
Return values
Determines whether structured JSON output SHOULD be enabled implicitly.
private
isImplicitJsonOutputEnabled() : bool
Description
Commands MAY opt into runtime-environment-aware behavior by exposing a
$runtimeEnvironment property. Commands that do not expose it SHALL fall
back to the shared runtime-environment service from the DevTools container.
Return values
Determines whether a boolean input option was enabled.
private
isOptionEnabled(InputInterface
$input,
string
$option) : bool
Parameters
$input
:
InputInterface
$option
:
string
Return values
private
resolveRuntimeEnvironment() : RuntimeEnvironmentInterface|null