Skip to documentation

RuntimeCommand

Class
extends Command
Final: Yes

Exposes runtime paths without relying on an executor's private cache layout.

Description

The command MUST emit one JSON object without changing the working project.

Attributes
#[AsCommand]
$name : 'runtime'
$description : 'Prints the active DevTools runtime as JSON.'
$aliases : []

Table of Contents

Properties

Methods

 : mixed
addJsonOption()

Adds the standard JSON output options to the current command.

 : static
 : void
 : int
isJsonOutput()

Determines whether JSON output was requested.

 : bool
isPrettyJsonOutput()

Determines whether pretty JSON output was requested.

 : bool
isImplicitJsonOutputEnabled()

Determines whether structured JSON output SHOULD be enabled implicitly.

 : bool
isOptionEnabled()

Determines whether a boolean input option was enabled.

 : bool
Properties
Methods

addJsonOption()

Protected

Adds the standard JSON output options to the current command.

protected addJsonOption() : static
Return values
static

execute()

Protected
protected execute(InputInterface  $input, OutputInterface  $output) : int
Parameters
$input : InputInterface
$output : OutputInterface
Return values
int

isJsonOutput()

Protected

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
bool

isPrettyJsonOutput()

Protected

Determines whether pretty JSON output was requested.

protected isPrettyJsonOutput(InputInterface  $input) : bool
Parameters
$input : InputInterface
Return values
bool

isImplicitJsonOutputEnabled()

Private

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
bool

isOptionEnabled()

Private

Determines whether a boolean input option was enabled.

private isOptionEnabled(InputInterface  $input, string  $option) : bool
Parameters
$input : InputInterface
$option : string
Return values
bool
Search results