Overview

Namespaces

  • Evenement
  • None
  • Peridot
    • Console
    • Core
    • Reporter
    • Runner
    • Scope
    • Test
  • Symfony
    • Component
      • Console
        • Command
        • Descriptor
        • Event
        • Exception
        • Formatter
        • Helper
        • Input
        • Logger
        • Output
        • Question
        • Style
        • Tester
        • Tests
          • Command
          • Descriptor
          • Fixtures
          • Formatter
          • Helper
          • Input
          • Logger
          • Output
          • Style
          • Tester

Classes

  • DebugFormatterHelper
  • DescriptorHelper
  • DialogHelper
  • FormatterHelper
  • Helper
  • HelperSet
  • InputAwareHelper
  • ProcessHelper
  • ProgressBar
  • ProgressHelper
  • ProgressIndicator
  • QuestionHelper
  • SymfonyQuestionHelper
  • Table
  • TableCell
  • TableHelper
  • TableSeparator
  • TableStyle

Interfaces

  • HelperInterface
  • Overview
  • Namespace
  • Class

Class ProcessHelper

The ProcessHelper class provides helpers to run external processes.

Symfony\Component\Console\Helper\Helper implements Symfony\Component\Console\Helper\HelperInterface
Extended by Symfony\Component\Console\Helper\ProcessHelper
Namespace: Symfony\Component\Console\Helper
Author: Fabien Potencier fabien@symfony.com
Located at Helper/ProcessHelper.php
Methods summary
public Symfony\Component\Process\Process
# run( Symfony\Component\Console\Output\OutputInterface $output, string|array|Symfony\Component\Process\Process $cmd, string|null $error = null, callable|null $callback = null, integer $verbosity = Symfony\Component\Console\Helper\OutputInterface::VERBOSITY_VERY_VERBOSE )

Runs an external process.

Runs an external process.

Parameters

$output
An OutputInterface instance
$cmd
An instance of Process or an array of arguments to escape and run or a command to run
$error
An error message that must be displayed if something went wrong
$callback

A PHP callback to run whenever there is some output available on STDOUT or STDERR

$verbosity
The threshold for verbosity

Returns

Symfony\Component\Process\Process
The process that ran
public Symfony\Component\Process\Process
# mustRun( Symfony\Component\Console\Output\OutputInterface $output, string|Symfony\Component\Process\Process $cmd, string|null $error = null, callable|null $callback = null )

Runs the 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.

Parameters

$output
An OutputInterface instance
$cmd
An instance of Process or a command to run
$error
An error message that must be displayed if something went wrong
$callback

A PHP callback to run whenever there is some output available on STDOUT or STDERR

Returns

Symfony\Component\Process\Process
The process that ran

Throws

Symfony\Component\Process\Exception\ProcessFailedException

See

Symfony\Component\Console\Helper\ProcessHelper::run()
public callable
# wrapCallback( Symfony\Component\Console\Output\OutputInterface $output, Symfony\Component\Process\Process $process, callable|null $callback = null )

Wraps a Process callback to add debugging output.

Wraps a Process callback to add debugging output.

Parameters

$output
An OutputInterface interface
$process
The Process
$callback
A PHP callable

Returns

callable
public string
# getName( )

Returns the canonical name of this helper.

Returns the canonical name of this helper.

Returns

string
The canonical name
Methods inherited from Symfony\Component\Console\Helper\Helper
formatMemory(), formatTime(), getHelperSet(), setHelperSet(), strlen(), strlenWithoutDecoration()
Properties inherited from Symfony\Component\Console\Helper\Helper
$helperSet
Peridot API documentation generated by ApiGen