Copied!

The ProcessHelper class provides helpers to run external processes.

Cloneable Instantiable
Methods
public static Symfony\Component\Console\Helper\Helper :: formatMemory ( int $memory )
public static Symfony\Component\Console\Helper\Helper :: formatTime ( int | float $secs )
public Symfony\Component\Console\Helper\Helper :: getHelperSet () : ? Symfony\Component\Console\Helper\HelperSet
 
public getName () : string
 

Returns the canonical name of this helper.

  • 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 mustRun ( Symfony\Component\Console\Output\OutputInterface $output , Symfony\Component\Process\Process | array $cmd , ? string $error = NULL , ? callable $callback = NULL ) : Symfony\Component\Process\Process
 

Runs the process.

This is identical to run() except that an exception is thrown if the process
exits with a non-zero exit code.

  • param array | Process $cmd An instance of Process or a command to run
  • param callable | null $callback A PHP callback to run whenever there is some
    output available on STDOUT or STDERR
  • throws ProcessFailedException
  • see \run()
public static Symfony\Component\Console\Helper\Helper :: removeDecoration ( Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter , ? string $string )
public run ( Symfony\Component\Console\Output\OutputInterface $output , Symfony\Component\Process\Process | array $cmd , ? string $error = NULL , ? callable $callback = NULL , int $verbosity = 128 Symfony\Component\Console\Output\OutputInterface::VERBOSITY_VERY_VERBOSE) : Symfony\Component\Process\Process
 

Runs an external process.

  • param array | Process $cmd An instance of Process or an array of the command and arguments
  • param callable | null $callback A PHP callback to run whenever there is some
    output available on STDOUT or STDERR
public Symfony\Component\Console\Helper\Helper :: setHelperSet ( ? Symfony\Component\Console\Helper\HelperSet $helperSet = NULL )
 
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.

public wrapCallback ( Symfony\Component\Console\Output\OutputInterface $output , Symfony\Component\Process\Process $process , ? callable $callback = NULL ) : callable
 

Wraps a Process callback to add debugging output.

Properties
protected Symfony\Component\Console\Helper\Helper :: $helperSet
Methods
private escapeString ( string $str ) : string
Methods
public static Symfony\Component\Console\Helper\Helper :: formatMemory ( int $memory )
public static Symfony\Component\Console\Helper\Helper :: formatTime ( int | float $secs )
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 )
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.

© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration