ProgressListenerInterface
An interface that tracks the progress of a longer-running progress.
This acts as a wrapper for Symfony ProgressBar on CLI, so see the info here.
The listener can be used multiple times when calling start() again a new progressbar starts.
this interface is still experimental, and not considered part of TYPO3 Public API.
Table of Contents
Methods
- advance() : void
- Move the progress one step further
- finish() : void
- Stop the progress, automatically setting it to 100%.
- log() : void
- Can be used to render custom messages during the progress.
- start() : void
- Start a progress by using the maximum items, and an additional header message.
Methods
advance()
Move the progress one step further
public
advance([int $step = 1 ][, string|null $additionalMessage = null ]) : void
Parameters
- $step : int = 1
-
by default, this is "1" but can be used to skip further.
- $additionalMessage : string|null = null
-
a separate text message
finish()
Stop the progress, automatically setting it to 100%.
public
finish([string|null $additionalMessage = null ]) : void
Parameters
- $additionalMessage : string|null = null
-
a separate text message
log()
Can be used to render custom messages during the progress.
public
log(string $message[, string $logLevel = LogLevel::INFO ]) : void
Parameters
- $message : string
-
the message to render
- $logLevel : string = LogLevel::INFO
-
used as severity
start()
Start a progress by using the maximum items, and an additional header message.
public
start([int $maxSteps = 0 ][, string|null $additionalMessage = null ]) : void
Parameters
- $maxSteps : int = 0
-
set the maximum amount of items to be processed
- $additionalMessage : string|null = null
-
a separate text message