\Symfony\Component\Console\HelperDebugFormatterHelper

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.

Summary

Methods
Properties
Constants
setHelperSet()
getHelperSet()
strlen()
substr()
formatTime()
formatMemory()
strlenWithoutDecoration()
removeDecoration()
start()
progress()
stop()
getName()
No public properties found
No constants found
No protected methods found
$helperSet
N/A
getBorder()
$colors
$started
$count
N/A

Properties

$helperSet

$helperSet : 

Type

$colors

$colors : 

Type

$started

$started : 

Type

$count

$count : 

Type

Methods

strlen()

strlen(string  $string) : integer

Returns the length of a string, using mb_strwidth if it is available.

Parameters

string $string

The string to check its length

Returns

integer —

The length of the string

substr()

substr(string  $string, integer  $from, integer|null  $length = null) : string

Returns the subset of a string, using mb_substr if it is available.

Parameters

string $string

String to subset

integer $from

Start offset

integer|null $length

Length to read

Returns

string —

The string subset

formatTime()

formatTime(  $secs) 

Parameters

$secs

formatMemory()

formatMemory(  $memory) 

Parameters

$memory

start()

start(string  $id, string  $message, string  $prefix = 'RUN') : string

Starts a debug formatting session.

Parameters

string $id

The id of the formatting session

string $message

The message to display

string $prefix

The prefix to use

Returns

string

progress()

progress(string  $id, string  $buffer, boolean  $error = false, string  $prefix = 'OUT', string  $errorPrefix = 'ERR') : string

Adds progress to a formatting session.

Parameters

string $id

The id of the formatting session

string $buffer

The message to display

boolean $error

Whether to consider the buffer as error

string $prefix

The prefix for output

string $errorPrefix

The prefix for error output

Returns

string

stop()

stop(string  $id, string  $message, boolean  $successful, string  $prefix = 'RES') : string

Stops a formatting session.

Parameters

string $id

The id of the formatting session

string $message

The message to display

boolean $successful

Whether to consider the result as success

string $prefix

The prefix for the end output

Returns

string

getName()

getName() 

{@inheritdoc}

getBorder()

getBorder(string  $id) : string

Parameters

string $id

The id of the formatting session

Returns

string