Symfony\Component\Process\Process::clearOutput PHP Méthode

clearOutput() public méthode

Clears the process output.
public clearOutput ( ) : Process
Résultat Process
    public function clearOutput()
    {
        ftruncate($this->stdout, 0);
        fseek($this->stdout, 0);
        $this->incrementalOutputOffset = 0;
        return $this;
    }

Usage Example

Exemple #1
0
 /**
  * @return Result
  */
 public function getResult()
 {
     if ($this->resultProcessed) {
         throw new RuntimeException('Result has already been processed.');
     }
     /**
      * Exit Code should be 0, 1, 2 or a larger integer.
      * The exit code 0 indicates no problem, should be an escaped mutant
      * detected by checkout the out.
      * Exit codes 1 and 2 indicate failures in the test framework, should
      * be caught mutants.
      * Other exit codes should arise on non-associated errors.
      */
     $status = Result::getStatusCode($this->adapter->ok($this->process->getOutput()), $this->process->getExitCode(), $this->isTimeout);
     $result = new Result($this->mutant, $status, $this->process->getOutput(), $this->process->getErrorOutput());
     $this->process->clearOutput();
     $this->resultProcessed = true;
     return $result;
 }
All Usage Examples Of Symfony\Component\Process\Process::clearOutput