Documentation

Helper
in package
implements HelperInterface

AbstractYes

Helper is the base class for all helper classes.

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

Interfaces

HelperInterface
HelperInterface is the interface all helpers must implement.

Properties

$helperSet  : 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.
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

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

setHelperSet()

Sets the helper set associated with this helper.

public setHelperSet([HelperSet $helperSet = null ]) : mixed
Parameters
$helperSet : HelperSet = null

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

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


        
On this page

Search results