abstract class InputAwareHelper extends Helper implements InputAwareInterface

An implementation of InputAwareInterface for Helpers.

Properties

protected $helperSet from Helper
protected $input

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 string
substr(string $string, int $from, int|null $length = null)

Returns the subset of a string, using mb_substr 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
static 
removeDecoration(OutputFormatterInterface $formatter, $string)

No description

from Helper
setInput(InputInterface $input)

Sets the Console Input.

Details

setHelperSet(HelperSet $helperSet = null)

Sets the helper set associated with this helper.

Parameters

HelperSet $helperSet

HelperSet getHelperSet()

Gets the helper set associated with this helper.

Return Value

HelperSet A HelperSet instance

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

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

static formatTime($secs)

Parameters

$secs

static formatMemory($memory)

Parameters

$memory

static strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)

Parameters

OutputFormatterInterface $formatter
$string

static removeDecoration(OutputFormatterInterface $formatter, $string)

Parameters

OutputFormatterInterface $formatter
$string

setInput(InputInterface $input)

Sets the Console Input.

Parameters

InputInterface $input