Nwidart\Modules\Process\Installer::run PHP Method

run() public method

Run the installation process.
public run ( ) : Process
return Symfony\Component\Process\Process
    public function run()
    {
        $process = $this->getProcess();
        $process->setTimeout($this->timeout);
        if ($this->console instanceof Command) {
            $process->run(function ($type, $line) {
                $this->console->line($line);
            });
        }
        return $process;
    }

Usage Example

 /**
  * Install the specified module.
  *
  * @param string $name
  * @param string $version
  * @param string $type
  * @param bool   $tree
  */
 protected function install($name, $version = 'dev-master', $type = 'composer', $tree = false)
 {
     $installer = new Installer($name, $version, $type ?: $this->option('type'), $tree ?: $this->option('tree'));
     $installer->setRepository($this->laravel['modules']);
     $installer->setConsole($this);
     if ($timeout = $this->option('timeout')) {
         $installer->setTimeout($timeout);
     }
     if ($path = $this->option('path')) {
         $installer->setPath($path);
     }
     $installer->run();
     if (!$this->option('no-update')) {
         $this->call('module:update', ['module' => $installer->getModuleName()]);
     }
 }
All Usage Examples Of Nwidart\Modules\Process\Installer::run