Пример #1
0
 /**
  * @return Requirement\Result
  */
 public function checkRequirements()
 {
     $result = new Requirement\Result();
     if ($this->commandLine->isToolInstalled($this->cmd)) {
         $result->setSucess(true);
     } else {
         $result->setErrorMessage('command line tool "ps" ist not installed. Please install "ps".');
     }
     return $result;
 }
Пример #2
0
 /**
  * @return Requirement\Result
  */
 public function checkRequirements()
 {
     $commandLine = new CommandLine();
     $result = new Requirement\Result();
     if ($commandLine->isToolInstalled($this->cmd . ' -h')) {
         $result->setSucess(true);
     } else {
         $result->setErrorMessage('command line tool "strace" ist not installed. Please install "strace".');
     }
     if ($result->getSucess()) {
         if (false === $commandLine->isToolInstalled('tail --help')) {
             $result->setSucess(false);
             $result->setErrorMessage('command line tool "tail" is not installed. please install "tail".');
         }
     }
     if ($result->getSucess()) {
         if (false === function_exists('pcntl_fork')) {
             $result->setSucess(false);
             $result->setErrorMessage('PCNTL extension not found. Please install PHP PCNTL extension. If the extension is installed, check your php.ini if there are some pcntl functions disabled (https://github.com/markus-perl/php-strace/issues/1).');
         }
     }
     return $result;
 }