Newscoop\Services\Plugins\ManagerService::installComposer PHP Метод

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

Install composer
public installComposer ( )
    public function installComposer()
    {
        $filesystem = new Filesystem();
        if (!$filesystem->exists($this->newsoopDir . 'composer.phar')) {
            $installComposer = new Process('cd ' . $this->newsoopDir . ' && curl -s https://getcomposer.org/installer | php');
            $installComposer->setTimeout(3600);
            $installComposer->run();
            if (!$installComposer->isSuccessful()) {
                throw new \Exception("Error with installing composer", 1);
            }
        }
    }