Symfony\Component\Process\ExecutableFinder::addSuffix PHP Метод

addSuffix() публичный Метод

public addSuffix ( $suffix )
    public function addSuffix($suffix)
    {
        $this->suffixes[] = $suffix;
    }

Usage Example

Пример #1
0
 /**
  * @return string
  */
 public function findComposer()
 {
     $currentPath = realpath(getcwd());
     $finder = new ExecutableFinder();
     $finder->addSuffix('phar');
     $binary = $finder->find('composer', null, explode(DIRECTORY_SEPARATOR, $currentPath));
     if ($binary === null) {
         $binary = $this->installComposer();
     }
     if ($binary === null) {
         throw new \RuntimeException('Cannot find composer');
     }
     return $binary;
 }