Webmozart\Console\Process\ProcessLauncher::isSupported PHP Méthode

isSupported() public méthode

Returns whether the launcher is supported on the current system.
public isSupported ( ) : boolean
Résultat boolean Whether the launcher is supported on the current system.
    public function isSupported()
    {
        return function_exists('proc_open');
    }

Usage Example

Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function handle()
 {
     if (!$this->processLauncher->isSupported()) {
         throw new RuntimeException('The ProcessLauncher must be supported for the man help to run.');
     }
     if (!$this->manBinary) {
         $this->manBinary = $this->executableFinder->find('man');
     }
     if (!$this->manBinary) {
         throw new RuntimeException('The "man" binary was not found.');
     }
     return $this->processLauncher->launchProcess(escapeshellcmd($this->manBinary) . ' -l %path%', array('path' => $this->path), false);
 }
All Usage Examples Of Webmozart\Console\Process\ProcessLauncher::isSupported