PHP Class Nwidart\Modules\Process\Installer

Show file Open project: nwidart/laravel-modules Class Usage Examples

Protected Properties

Property Type Description
$console Illuminate\Console\Command The console command instance.
$name string The module name.
$path string The destionation path.
$repository Nwidart\Modules\Repository The module repository instance.
$timeout integer The process timeout.
$version string The version of module being installed.

Public Methods

Method Description
__construct ( string $name, string $version = null, string $type = null, boolean $tree = false ) The constructor.
getBranch ( ) : string Get branch name.
getDestinationPath ( ) : string Get destination path.
getModuleName ( ) : string Get module name.
getPackageName ( ) : string Get composer package name.
getProcess ( ) : Process Get process instance.
getRepoUrl ( ) : string | null Get git repo url.
installViaComposer ( ) : Process Install the module via composer.
installViaGit ( ) : Process Install the module via git.
installViaSubtree ( ) : Process Install the module via git subtree.
run ( ) : Process Run the installation process.
setConsole ( Illuminate\Console\Command $console ) Set console command instance.
setPath ( string $path ) Set destination path.
setRepository ( Repository $repository ) Set the module repository instance.
setTimeout ( integer $timeout ) Set process timeout.

Method Details

__construct() public method

The constructor.
public __construct ( string $name, string $version = null, string $type = null, boolean $tree = false )
$name string
$version string
$type string
$tree boolean

getBranch() public method

Get branch name.
public getBranch ( ) : string
return string

getDestinationPath() public method

Get destination path.
public getDestinationPath ( ) : string
return string

getModuleName() public method

Get module name.
public getModuleName ( ) : string
return string

getPackageName() public method

Get composer package name.
public getPackageName ( ) : string
return string

getProcess() public method

Get process instance.
public getProcess ( ) : Process
return Symfony\Component\Process\Process

getRepoUrl() public method

Get git repo url.
public getRepoUrl ( ) : string | null
return string | null

installViaComposer() public method

Install the module via composer.
public installViaComposer ( ) : Process
return Symfony\Component\Process\Process

installViaGit() public method

Install the module via git.
public installViaGit ( ) : Process
return Symfony\Component\Process\Process

installViaSubtree() public method

Install the module via git subtree.
public installViaSubtree ( ) : Process
return Symfony\Component\Process\Process

run() public method

Run the installation process.
public run ( ) : Process
return Symfony\Component\Process\Process

setConsole() public method

Set console command instance.
public setConsole ( Illuminate\Console\Command $console )
$console Illuminate\Console\Command

setPath() public method

Set destination path.
public setPath ( string $path )
$path string

setRepository() public method

Set the module repository instance.
public setRepository ( Repository $repository )
$repository Nwidart\Modules\Repository

setTimeout() public method

Set process timeout.
public setTimeout ( integer $timeout )
$timeout integer

Property Details

$console protected property

The console command instance.
protected Command,Illuminate\Console $console
return Illuminate\Console\Command

$name protected property

The module name.
protected string $name
return string

$path protected property

The destionation path.
protected string $path
return string

$repository protected property

The module repository instance.
protected Repository,Nwidart\Modules $repository
return Nwidart\Modules\Repository

$timeout protected property

The process timeout.
protected int $timeout
return integer

$version protected property

The version of module being installed.
protected string $version
return string