Helper
in package
implements
HelperInterface
AbstractYes
Helper is the base class for all helper classes.
Tags
Table of Contents
Interfaces
- HelperInterface
- HelperInterface is the interface all helpers must implement.
Properties
- $helperSet : mixed
Methods
- formatMemory() : mixed
- formatTime() : mixed
- getHelperSet() : HelperSet|null
- Gets the helper set associated with this helper.
- length() : int
- Returns the length of a string, using mb_strlen if it is available.
- removeDecoration() : mixed
- setHelperSet() : mixed
- Sets the helper set associated with this helper.
- 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.
- width() : int
- Returns the width of a string, using mb_strwidth if it is available.
Properties
$helperSet
protected
mixed
$helperSet
= null
Methods
formatMemory()
public
static formatMemory(int $memory) : mixed
Parameters
- $memory : int
formatTime()
public
static formatTime(mixed $secs) : mixed
Parameters
- $secs : mixed
getHelperSet()
Gets the helper set associated with this helper.
public
getHelperSet() : HelperSet|null
Return values
HelperSet|nulllength()
Returns the length of a string, using mb_strlen if it is available.
public
static length(string|null $string) : int
The length is related to how many bytes the string will use.
Parameters
- $string : string|null
Return values
intremoveDecoration()
public
static removeDecoration(OutputFormatterInterface $formatter, string|null $string) : mixed
Parameters
- $formatter : OutputFormatterInterface
- $string : string|null
setHelperSet()
Sets the helper set associated with this helper.
public
setHelperSet([HelperSet|null $helperSet = null ]) : mixed
Parameters
- $helperSet : HelperSet|null = null
strlen()
Returns the length of a string, using mb_strwidth if it is available.
public
static strlen(string|null $string) : int
Parameters
- $string : string|null
Tags
Return values
intstrlenWithoutDecoration()
public
static strlenWithoutDecoration(OutputFormatterInterface $formatter, string|null $string) : mixed
Parameters
- $formatter : OutputFormatterInterface
- $string : string|null
Tags
substr()
Returns the subset of a string, using mb_substr if it is available.
public
static substr(string|null $string, int $from[, int|null $length = null ]) : string
Parameters
- $string : string|null
- $from : int
- $length : int|null = null
Return values
stringwidth()
Returns the width of a string, using mb_strwidth if it is available.
public
static width(string|null $string) : int
The width is how many characters positions the string will use.
Parameters
- $string : string|null