DebugFormatterHelper
        
        extends Helper
    
    
            
            in package
            
        
    
    
    
        
            Helps outputting debug information when running an external program from a command.
An external program can be a Process, an HTTP request, or anything else.
Tags
Table of Contents
- COLORS = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default']
 - $helperSet : mixed
 - $count : mixed
 - $started : mixed
 - formatMemory() : mixed
 - formatTime() : mixed
 - getHelperSet() : HelperSet|null
 - Gets the helper set associated with this helper.
 - getName() : mixed
 - {@inheritdoc}
 - length() : int
 - Returns the length of a string, using mb_strlen if it is available.
 - progress() : string
 - Adds progress to a formatting session.
 - removeDecoration() : mixed
 - setHelperSet() : mixed
 - Sets the helper set associated with this helper.
 - start() : string
 - Starts a debug formatting session.
 - stop() : string
 - Stops a formatting session.
 - strlen() : int
 - Returns the length of a string, using mb_strwidth if it is available.
 - strlenWithoutDecoration() : mixed
 - substr() : string
 - Returns the subset of a string, using mb_substr if it is available.
 - width() : int
 - Returns the width of a string, using mb_strwidth if it is available.
 - getBorder() : string
 
Constants
COLORS
    private
    mixed
    COLORS
    = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default']
        
        
    
Properties
$helperSet
    protected
        mixed
    $helperSet
     = null
        
        
    
$count
    private
        mixed
    $count
     = -1
        
        
    
$started
    private
        mixed
    $started
     = []
        
        
    
Methods
formatMemory()
    public
            static    formatMemory(int $memory) : mixed
        
        Parameters
- $memory : int
 
Return values
mixed —formatTime()
    public
            static    formatTime(mixed $secs) : mixed
        
        Parameters
- $secs : mixed
 
Return values
mixed —getHelperSet()
Gets the helper set associated with this helper.
    public
                getHelperSet() : HelperSet|null
    
    
    
        Return values
HelperSet|null —getName()
{@inheritdoc}
    public
                getName() : mixed
    
    
    
        Return values
mixed —length()
Returns the length of a string, using mb_strlen if it is available.
    public
            static    length(string|null $string) : int
        The length is related to how many bytes the string will use.
Parameters
- $string : string|null
 
Return values
int —progress()
Adds progress to a formatting session.
    public
                progress(string $id, string $buffer[, bool $error = false ][, string $prefix = 'OUT' ][, string $errorPrefix = 'ERR' ]) : string
    
        Parameters
- $id : string
 - $buffer : string
 - $error : bool = false
 - $prefix : string = 'OUT'
 - $errorPrefix : string = 'ERR'
 
Return values
string —removeDecoration()
    public
            static    removeDecoration(OutputFormatterInterface $formatter, string|null $string) : mixed
        
        Parameters
- $formatter : OutputFormatterInterface
 - $string : string|null
 
Return values
mixed —setHelperSet()
Sets the helper set associated with this helper.
    public
                setHelperSet([HelperSet|null $helperSet = null ]) : mixed
    
        Parameters
- $helperSet : HelperSet|null = null
 
Return values
mixed —start()
Starts a debug formatting session.
    public
                start(string $id, string $message[, string $prefix = 'RUN' ]) : string
    
        Parameters
- $id : string
 - $message : string
 - $prefix : string = 'RUN'
 
Return values
string —stop()
Stops a formatting session.
    public
                stop(string $id, string $message, bool $successful[, string $prefix = 'RES' ]) : string
    
        Parameters
- $id : string
 - $message : string
 - $successful : bool
 - $prefix : string = 'RES'
 
Return values
string —strlen()
Returns the length of a string, using mb_strwidth if it is available.
    public
            static    strlen(string|null $string) : int
    
        Parameters
- $string : string|null
 
Tags
Return values
int —strlenWithoutDecoration()
    public
            static    strlenWithoutDecoration(OutputFormatterInterface $formatter, string|null $string) : mixed
    
        Parameters
- $formatter : OutputFormatterInterface
 - $string : string|null
 
Tags
Return values
mixed —substr()
Returns the subset of a string, using mb_substr if it is available.
    public
            static    substr(string|null $string, int $from[, int|null $length = null ]) : string
    
        Parameters
- $string : string|null
 - $from : int
 - $length : int|null = null
 
Return values
string —width()
Returns the width of a string, using mb_strwidth if it is available.
    public
            static    width(string|null $string) : int
        The width is how many characters positions the string will use.
Parameters
- $string : string|null
 
Return values
int —getBorder()
    private
                getBorder(string $id) : string
        
        Parameters
- $id : string