trait VerbosityThresholdTrait (View source)

Task input/output methods. TaskIO is 'used' in BaseTask, so any task that extends this class has access to all of the methods here.

printTaskInfo, printTaskSuccess, and printTaskError are the three primary output methods that tasks are encouraged to use. Tasks should avoid using the IO trait output methods.

Properties

protected OutputAdapterInterface $outputAdapter
protected int $verbosityThreshold

Methods

$this
setVerbosityThreshold(int $verbosityThreshold)

Required verbosity level before any TaskIO output will be produced.

int
verbosityThreshold()

No description

setOutputAdapter(OutputAdapterInterface $outputAdapter)

No description

bool
hasOutputAdapter()

No description

bool
verbosityMeetsThreshold()

No description

writeMessage(string $message)

Print a message if the selected verbosity level is over this task's verbosity threshold.

Details

$this setVerbosityThreshold(int $verbosityThreshold)

Required verbosity level before any TaskIO output will be produced.

e.g. OutputInterface::VERBOSITY_VERBOSE

Parameters

int $verbosityThreshold

Return Value

$this

int verbosityThreshold()

No description

Return Value

int

setOutputAdapter(OutputAdapterInterface $outputAdapter)

No description

Parameters

OutputAdapterInterface $outputAdapter

OutputAdapterInterface outputAdapter()

No description

Return Value

OutputAdapterInterface

bool hasOutputAdapter()

No description

Return Value

bool

bool verbosityMeetsThreshold()

No description

Return Value

bool

writeMessage(string $message)

Print a message if the selected verbosity level is over this task's verbosity threshold.

Parameters

string $message