InputAwareHelper
extends Helper
in package
implements
InputAwareInterface
AbstractYes
An implementation of InputAwareInterface for Helpers.
Tags
Table of Contents
Interfaces
- InputAwareInterface
- InputAwareInterface should be implemented by classes that depends on the Console Input.
Properties
- $helperSet : mixed
- $input : mixed
Methods
- formatMemory() : mixed
- formatTime() : mixed
- getHelperSet() : HelperSet
- Gets the helper set associated with this helper.
- removeDecoration() : mixed
- setHelperSet() : mixed
- Sets the helper set associated with this helper.
- setInput() : mixed
- Sets the Console Input.
- strlen() : int
- Returns the length of a string, using mb_strwidth if it is available.
- strlenWithoutDecoration() : mixed
- substr() : string
- Returns the subset of a string, using mb_substr if it is available.
Properties
$helperSet
protected
mixed
$helperSet
= null
$input
protected
mixed
$input
Methods
formatMemory()
public
static formatMemory(mixed $memory) : mixed
Parameters
- $memory : mixed
formatTime()
public
static formatTime(mixed $secs) : mixed
Parameters
- $secs : mixed
getHelperSet()
Gets the helper set associated with this helper.
public
getHelperSet() : HelperSet
Return values
HelperSet —A HelperSet instance
removeDecoration()
public
static removeDecoration(OutputFormatterInterface $formatter, mixed $string) : mixed
Parameters
- $formatter : OutputFormatterInterface
- $string : mixed
setHelperSet()
Sets the helper set associated with this helper.
public
setHelperSet([HelperSet $helperSet = null ]) : mixed
Parameters
- $helperSet : HelperSet = null
setInput()
Sets the Console Input.
public
setInput(InputInterface $input) : mixed
Parameters
- $input : InputInterface
strlen()
Returns the length of a string, using mb_strwidth if it is available.
public
static strlen(string $string) : int
Parameters
- $string : string
-
The string to check its length
Return values
int —The length of the string
strlenWithoutDecoration()
public
static strlenWithoutDecoration(OutputFormatterInterface $formatter, mixed $string) : mixed
Parameters
- $formatter : OutputFormatterInterface
- $string : mixed
substr()
Returns the subset of a string, using mb_substr if it is available.
public
static substr(string $string, int $from[, int|null $length = null ]) : string
Parameters
- $string : string
-
String to subset
- $from : int
-
Start offset
- $length : int|null = null
-
Length to read
Return values
string —The string subset