Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Process.php

function Process::setInput

Sets the input.

This content will be passed to the underlying process standard input.

Parameters

string|resource|\Traversable|self|null $input The content:

Return value

$this

Throws

LogicException In case the process is running

1 call to Process::setInput()
Process::__construct in vendor/symfony/process/Process.php

File

vendor/symfony/process/Process.php, line 1154

Class

Process
Process is a thin wrapper around proc_* functions to easily start independent PHP processes.

Namespace

Symfony\Component\Process

Code

public function setInput(mixed $input) : static {
    if ($this->isRunning()) {
        throw new LogicException('Input cannot be set while the process is running.');
    }
    $this->input = ProcessUtils::validateInput(__METHOD__, $input);
    return $this;
}
RSS feed
Powered by Drupal