Copied!

The Formatter class provides helpers to format messages.

CloneableInstantiable
Methods
public formatBlock(array|string $messages, string $style, bool $large = false) : string
 

Formats a message as a block of text.

public static Symfony\Component\Console\Helper\Helper::formatMemory(int $memory) : string
public formatSection(string $section, string $message, string $style = 'info') : string
 

Formats a message within a section.

public static Symfony\Component\Console\Helper\Helper::formatTime(int|float $secs, int $precision = 1) : string
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 static Symfony\Component\Console\Helper\Helper::removeDecoration(Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter, ?string $string) : string
public Symfony\Component\Console\Helper\Helper::setHelperSet(?Symfony\Component\Console\Helper\HelperSet $helperSet) : 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 truncate(string $message, int $length, string $suffix = '...') : string
 

Truncates a message to the given length.

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\HelperSet Symfony\Component\Console\Helper\Helper::$helperSet = NULL
Methods
public static Symfony\Component\Console\Helper\Helper::formatMemory(int $memory) : string
public static Symfony\Component\Console\Helper\Helper::formatTime(int|float $secs, int $precision = 1) : 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) : 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.

© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration