abstract class AbstractPipes in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/process/Pipes/AbstractPipes.php \Symfony\Component\Process\Pipes\AbstractPipes
@author Romain Neutron <imprec@gmail.com>
@internal
Hierarchy
- class \Symfony\Component\Process\Pipes\AbstractPipes implements PipesInterface
Expanded class hierarchy of AbstractPipes
File
- vendor/
symfony/ process/ Pipes/ AbstractPipes.php, line 19
Namespace
Symfony\Component\Process\PipesView source
abstract class AbstractPipes implements PipesInterface {
/** @var array */
public $pipes = array();
/** @var string */
protected $inputBuffer = '';
/** @var resource|null */
protected $input;
/** @var bool */
private $blocked = true;
/**
* {@inheritdoc}
*/
public function close() {
foreach ($this->pipes as $pipe) {
fclose($pipe);
}
$this->pipes = array();
}
/**
* Returns true if a system call has been interrupted.
*
* @return bool
*/
protected function hasSystemCallBeenInterrupted() {
$lastError = error_get_last();
// stream_select returns false when the `select` system call is interrupted by an incoming signal
return isset($lastError['message']) && false !== stripos($lastError['message'], 'interrupted system call');
}
/**
* Unblocks streams.
*/
protected function unblock() {
if (!$this->blocked) {
return;
}
foreach ($this->pipes as $pipe) {
stream_set_blocking($pipe, 0);
}
if (null !== $this->input) {
stream_set_blocking($this->input, 0);
}
$this->blocked = false;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractPipes:: |
private | property | @var bool | |
AbstractPipes:: |
protected | property | @var resource|null | |
AbstractPipes:: |
protected | property | @var string | |
AbstractPipes:: |
public | property | @var array | |
AbstractPipes:: |
public | function |
Closes file handles and pipes. Overrides PipesInterface:: |
1 |
AbstractPipes:: |
protected | function | Returns true if a system call has been interrupted. | |
AbstractPipes:: |
protected | function | Unblocks streams. | |
PipesInterface:: |
public | function | Returns if the current state has open file handles or pipes. | 2 |
PipesInterface:: |
constant | |||
PipesInterface:: |
public | function | Returns an array of descriptors for the use of proc_open. | 2 |
PipesInterface:: |
public | function | Returns an array of filenames indexed by their related stream in case these pipes use temporary files. | 2 |
PipesInterface:: |
public | function | Reads data in file handles and pipes. | 2 |