Copied!

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

CloneableInstantiable
Methods
public __construct()
public describe(Symfony\Component\Console\Output\OutputInterface $output, ?object $object, array $options = [])
 

Describes an object if supported.

Available options are:

  • format: string, the output format name
  • raw_text: boolean, sets output type as raw
  • return void
  • throws \InvalidArgumentException when the given format is not supported
public static Symfony\Component\Console\Helper\Helper::formatMemory(int $memory)
 
  • return string
public static Symfony\Component\Console\Helper\Helper::formatTime(int|float $secs)
 
  • return string
public getFormats() : array
public Symfony\Component\Console\Helper\Helper::getHelperSet() : ?Symfony\Component\Console\Helper\HelperSet
public getName() : string
public static Symfony\Component\Console\Helper\Helper::length(?string $string) : int
 

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

The length is related to how many bytes the string will use.

public register(string $format, Symfony\Component\Console\Descriptor\DescriptorInterface $descriptor) : static
 

Registers a descriptor.

  • return $this
public static Symfony\Component\Console\Helper\Helper::removeDecoration(Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter, ?string $string)
 
  • return string
public Symfony\Component\Console\Helper\Helper::setHelperSet(?Symfony\Component\Console\Helper\HelperSet $helperSet = NULL)
 
  • return void
public static Symfony\Component\Console\Helper\Helper::substr(?string $string, int $from, ?int $length = NULL) : string
 

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

public static Symfony\Component\Console\Helper\Helper::width(?string $string) : int
 

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

The width is how many characters positions the string will use.

Properties
protected Symfony\Component\Console\Helper\Helper::$helperSet = NULL
Properties
private array $descriptors = []
 
  • var \DescriptorInterface[]
Methods
public static Symfony\Component\Console\Helper\Helper::formatMemory(int $memory)
 
  • return string
public static Symfony\Component\Console\Helper\Helper::formatTime(int|float $secs)
 
  • return string
public static Symfony\Component\Console\Helper\Helper::length(?string $string) : int
 

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

The length is related to how many bytes the string will use.

public static Symfony\Component\Console\Helper\Helper::removeDecoration(Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter, ?string $string)
 
  • return string
public static Symfony\Component\Console\Helper\Helper::substr(?string $string, int $from, ?int $length = NULL) : string
 

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

public static Symfony\Component\Console\Helper\Helper::width(?string $string) : int
 

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

The width is how many characters positions the string will use.

© 2023 Bruce Wells
Search Namespaces \ Classes
Configuration