\app\framework\Component\Console\HelperDescriptorHelper

Summary

Methods
Properties
Constants
strlen()
substr()
formatTime()
formatMemory()
strlenWithoutDecoration()
removeDecoration()
__construct()
describe()
register()
getName()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$descriptors
N/A

Properties

Methods

strlen()

strlen(string  $string) : integer

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

Parameters

string $string

The string to check its length

Returns

integer —

The length of the string

substr()

substr(string  $string, integer  $from, integer|null  $length = null) : string

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

Parameters

string $string

String to subset

integer $from

Start offset

integer|null $length

Length to read

Returns

string —

The string subset

formatTime()

formatTime(  $secs) 

Parameters

$secs

formatMemory()

formatMemory(  $memory) 

Parameters

$memory

__construct()

__construct() 

describe()

describe(\app\framework\Component\Console\Output\OutputInterface  $output, object  $object, array  $options = array()) 

Describes an object if supported.

Available options are:

  • format: string, the output format name
  • raw_text: boolean, sets output type as raw

Parameters

\app\framework\Component\Console\Output\OutputInterface $output
object $object
array $options

Throws

\InvalidArgumentException

when the given format is not supported

getName()

getName() 

{@inheritdoc}