Helps outputting debug information when running an external program from a command.
An external program can be a Process, an HTTP request, or anything else.
- Full name:
\Symfony\Component\Console\Helper\DebugFormatterHelper
- Parent class:
\Symfony\Component\Console\Helper\Helper
Constant | Visibility | Type | Value |
---|---|---|---|
COLORS |
private | ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default'] |
private $started
private $count
Starts a debug formatting session.
public start(string $id, string $message, string $prefix = 'RUN'): string
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
string | |
$message |
string | |
$prefix |
string |
Adds progress to a formatting session.
public progress(string $id, string $buffer, bool $error = false, string $prefix = 'OUT', string $errorPrefix = 'ERR'): string
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
string | |
$buffer |
string | |
$error |
bool | |
$prefix |
string | |
$errorPrefix |
string |
Stops a formatting session.
public stop(string $id, string $message, bool $successful, string $prefix = 'RES'): string
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
string | |
$message |
string | |
$successful |
bool | |
$prefix |
string |
private getBorder(string $id): string
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
string |
{@inheritdoc}
public getName(): mixed
Sets the helper set associated with this helper.
public setHelperSet(\Symfony\Component\Console\Helper\HelperSet $helperSet = null): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$helperSet |
\Symfony\Component\Console\Helper\HelperSet |
Gets the helper set associated with this helper.
public getHelperSet(): \Symfony\Component\Console\Helper\HelperSet|null
Returns the length of a string, using mb_strwidth if it is available.
public static strlen(?string $string): int
-
This method is static.
-
Warning: this method is deprecated. This means that this method will likely be removed in a future version.
Parameters:
Parameter | Type | Description |
---|---|---|
$string |
?string |
Returns the width of a string, using mb_strwidth if it is available.
public static width(?string $string): int
The width is how many characters positions the string will use.
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$string |
?string |
Returns the length of a string, using mb_strlen if it is available.
public static length(?string $string): int
The length is related to how many bytes the string will use.
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$string |
?string |
Returns the subset of a string, using mb_substr if it is available.
public static substr(?string $string, int $from, int $length = null): string
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$string |
?string | |
$from |
int | |
$length |
int |
public static formatTime(mixed $secs): mixed
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$secs |
mixed |
public static formatMemory(int $memory): mixed
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$memory |
int |
public static strlenWithoutDecoration(\Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter, ?string $string): mixed
-
This method is static.
-
Warning: this method is deprecated. This means that this method will likely be removed in a future version.
Parameters:
Parameter | Type | Description |
---|---|---|
$formatter |
\Symfony\Component\Console\Formatter\OutputFormatterInterface | |
$string |
?string |
public static removeDecoration(\Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter, ?string $string): mixed
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$formatter |
\Symfony\Component\Console\Formatter\OutputFormatterInterface | |
$string |
?string |