class DebugFormatterHelper extends Helper

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.

Methods

setHelperSet(HelperSet $helperSet = null)

Sets the helper set associated with this helper.

from Helper
getHelperSet()

Gets the helper set associated with this helper.

from Helper
static int
strlen(string $string)

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

from Helper
static 
formatTime($secs)

No description

from Helper
static 
formatMemory($memory)

No description

from Helper
static 
strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)

No description

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

Starts a debug formatting session.

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

Adds progress to a formatting session.

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

Stops a formatting session.

string
getName()

Returns the canonical name of this helper.

Details

in Helper at line line 30
setHelperSet(HelperSet $helperSet = null)

Sets the helper set associated with this helper.

Parameters

HelperSet $helperSet A HelperSet instance

in Helper at line line 40
HelperSet getHelperSet()

Gets the helper set associated with this helper.

Return Value

HelperSet A HelperSet instance

in Helper at line line 52
static int strlen(string $string)

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

Parameters

string $string The string to check its length

Return Value

int The length of the string

in Helper at line line 61
static formatTime($secs)

Parameters

$secs

in Helper at line line 88
static formatMemory($memory)

Parameters

$memory

in Helper at line line 105
static strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)

Parameters

OutputFormatterInterface $formatter
$string

at line line 36
string start(string $id, string $message, string $prefix = 'RUN')

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

Return Value

string

at line line 54
string progress(string $id, string $buffer, bool $error = false, string $prefix = 'OUT', string $errorPrefix = 'ERR')

Adds progress to a formatting session.

Parameters

string $id The id of the formatting session
string $buffer The message to display
bool $error Whether to consider the buffer as error
string $prefix The prefix for output
string $errorPrefix The prefix for error output

Return Value

string

at line line 95
string stop(string $id, string $message, bool $successful, string $prefix = 'RES')

Stops a formatting session.

Parameters

string $id The id of the formatting session
string $message The message to display
bool $successful Whether to consider the result as success
string $prefix The prefix for the end output

Return Value

string

at line line 123
string getName()

Returns the canonical name of this helper.

Return Value

string The canonical name