abstract class Helper implements HelperInterface

Helper is the base class for all helper classes.

Properties

protected $helperSet

Methods

setHelperSet(HelperSet $helperSet = null)

Sets the helper set associated with this helper.

getHelperSet()

Gets the helper set associated with this helper.

static int
strlen(string $string)

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

static string
substr(string $string, int $from, int|null $length = null)

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

static 
formatTime($secs)

No description

static 
formatMemory($memory)

No description

static 
strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)

No description

static 
removeDecoration(OutputFormatterInterface $formatter, $string)

No description

Details

at line 28
setHelperSet(HelperSet $helperSet = null)

Sets the helper set associated with this helper.

Parameters

HelperSet $helperSet

at line 36
HelperSet getHelperSet()

Gets the helper set associated with this helper.

Return Value

HelperSet A HelperSet instance

at line 48
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

at line 66
static string substr(string $string, int $from, int|null $length = null)

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

Parameters

string $string String to subset
int $from Start offset
int|null $length Length to read

Return Value

string The string subset

at line 75
static formatTime($secs)

Parameters

$secs

at line 104
static formatMemory($memory)

Parameters

$memory

at line 121
static strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)

Parameters

OutputFormatterInterface $formatter
$string

at line 126
static removeDecoration(OutputFormatterInterface $formatter, $string)

Parameters

OutputFormatterInterface $formatter
$string