Assetic\Util\Process::getErrorOutput PHP Method

getErrorOutput() public method

This only returns the error output if you have not supplied a callback to the run() method.
public getErrorOutput ( ) : string
return string The process error output
    public function getErrorOutput()
    {
        return $this->stderr;
    }

Usage Example

Example #1
0
 public function filterDump(AssetInterface $asset)
 {
     $options = array($this->jpegtranBin);
     if ($this->optimize) {
         $options[] = '-optimize';
     }
     if ($this->copy) {
         $options[] = '-copy';
         $options[] = $this->copy;
     }
     if ($this->progressive) {
         $options[] = '-progressive';
     }
     if (null !== $this->restart) {
         $options[] = '-restart';
         $options[] = $this->restart;
     }
     $options[] = $input = tempnam(sys_get_temp_dir(), 'assetic_jpegtran');
     file_put_contents($input, $asset->getContent());
     $proc = new Process(implode(' ', array_map('escapeshellarg', $options)));
     $code = $proc->run();
     unlink($input);
     if (0 < $code) {
         throw new \RuntimeException($proc->getErrorOutput());
     }
     $asset->setContent($proc->getOutput());
 }
All Usage Examples Of Assetic\Util\Process::getErrorOutput