class DescriptorHelper extends Helper
This class adds helper method to describe objects in various formats.
| protected | $helperSet | from Helper |
| setHelperSet(HelperSet $helperSet = null) Sets the helper set associated with this helper. | from Helper | |
| HelperSet | getHelperSet() Gets the helper set associated with this helper. | from Helper |
| static int | strlen(string $string) Returns the length of a string, using mb_strwidth if it is available. | from Helper |
| static string | substr(string $string, int $from, int|null $length = null) Returns the subset of a string, using mb_substr if it is available. | from Helper |
| static | formatTime($secs) | from Helper |
| static | formatMemory($memory) | from Helper |
| static | strlenWithoutDecoration(OutputFormatterInterface $formatter, $string) | from Helper |
| static | removeDecoration(OutputFormatterInterface $formatter, $string) | from Helper |
| __construct() | ||
| describe(OutputInterface $output, object $object, array $options = array()) Describes an object if supported. | ||
| $this | register(string $format, DescriptorInterface $descriptor) Registers a descriptor. | |
| string | getName() Returns the canonical name of this helper. |
Sets the helper set associated with this helper.
| HelperSet | $helperSet |
Gets the helper set associated with this helper.
| HelperSet | A HelperSet instance |
Returns the length of a string, using mb_strwidth if it is available.
| string | $string | The string to check its length |
| int | The length of the string |
Returns the subset of a string, using mb_substr if it is available.
| string | $string | String to subset |
| int | $from | Start offset |
| int|null | $length | Length to read |
| string | The string subset |
| $secs |
| $memory |
| OutputFormatterInterface | $formatter | |
| $string |
| OutputFormatterInterface | $formatter | |
| $string |
Describes an object if supported.
Available options are: * format: string, the output format name * raw_text: boolean, sets output type as raw
| OutputInterface | $output | |
| object | $object | |
| array | $options |
| InvalidArgumentException | when the given format is not supported |
Registers a descriptor.
| string | $format | |
| DescriptorInterface | $descriptor |
| $this |
Returns the canonical name of this helper.
| string | The canonical name |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Console/Helper/DescriptorHelper.html