\Symfony\Component\Console\HelperDescriptorHelper

This class adds helper method to describe objects in various formats.

Summary

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

Properties

$helperSet

$helperSet : 

Type

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(\Symfony\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

\Symfony\Component\Console\Output\OutputInterface $output
object $object
array $options

Throws

\Symfony\Component\Console\Exception\InvalidArgumentException

when the given format is not supported

getName()

getName() 

{@inheritdoc}