PHP Class Clickalicious\PhpMemAdmin\Installer

See also: https://github.com/wp-cli/php-cli-tools
Author: Benjamin Carl ([email protected])
Inheritance: extends BaseInstaller
Mostrar archivo Open project: clickalicious/phpmemadmin

Protected Properties

Property Type Description
$folders array Default folders we install.

Public Methods

Method Description
postInstall ( Composer\Script\CommandEvent $event ) : boolean | null Installer process for project based on post install event hook on composer.

Protected Methods

Method Description
askAlternatePath ( string $menu )
getFolders ( ) : array Getter for folders.
handleEvent ( Composer\Script\CommandEvent $event ) : boolean | null Handles a received event - dispatcher.
install ( string $targetDirectory ) : boolean Installs the folders required for the bootstrap project from repo to project folder.
resolveChoice ( string $menu, $choices = 'yn', $default = 'y' )
resolveTree ( $menu, $default = 'quit', $text = 'Your choice:' )
setFolders ( array $folders = [] ) : void Setter for folders.
showError ( string $message )
showFailed ( ) : void Shows the failed message after install failed.
showOutro ( $projectRoot = 'n.a.' ) : void Shows the outro message after install succeeded to inform about management console.
showSuccess ( ) : boolean Shows the success message after install was successful.
validatePath ( string $path ) : string Validates a path for installation.

Method Details

askAlternatePath() protected static method

protected static askAlternatePath ( string $menu )
$menu string

getFolders() protected static method

Getter for folders.
Author: Benjamin Carl ([email protected])
protected static getFolders ( ) : array
return array The folders.

handleEvent() protected static method

Handles a received event - dispatcher.
Author: Benjamin Carl ([email protected])
protected static handleEvent ( Composer\Script\CommandEvent $event ) : boolean | null
$event Composer\Script\CommandEvent
return boolean | null TRUE on success, otherwise FALSE

install() protected static method

Installs the folders required for the bootstrap project from repo to project folder.
Author: Benjamin Carl ([email protected])
protected static install ( string $targetDirectory ) : boolean
$targetDirectory string The directory where to put the files/folders.
return boolean TRUE on success, otherwise FALSE

postInstall() public static method

Installer process for project based on post install event hook on composer.
Author: Benjamin Carl ([email protected])
public static postInstall ( Composer\Script\CommandEvent $event ) : boolean | null
$event Composer\Script\CommandEvent The event passed in by Composer.
return boolean | null TRUE on success, otherwise FALSE (signal for Composer to resolve with error)

resolveChoice() protected static method

protected static resolveChoice ( string $menu, $choices = 'yn', $default = 'y' )
$menu string

resolveTree() protected static method

protected static resolveTree ( $menu, $default = 'quit', $text = 'Your choice:' )

setFolders() protected static method

Setter for folders.
Author: Benjamin Carl ([email protected])
protected static setFolders ( array $folders = [] ) : void
$folders array The folders to set.
return void

showError() protected static method

protected static showError ( string $message )
$message string

showFailed() protected static method

Shows the failed message after install failed.
Author: Benjamin Carl ([email protected])
protected static showFailed ( ) : void
return void

showOutro() protected static method

Shows the outro message after install succeeded to inform about management console.
Author: Benjamin Carl ([email protected])
protected static showOutro ( $projectRoot = 'n.a.' ) : void
return void

showSuccess() protected static method

Shows the success message after install was successful.
Author: Benjamin Carl ([email protected])
protected static showSuccess ( ) : boolean
return boolean

validatePath() protected static method

Validates a path for installation.
Author: Benjamin Carl ([email protected])
protected static validatePath ( string $path ) : string
$path string The path to validate
return string TRUE if path is valid, otherwise FALSE

Property Details

$folders protected_oe static_oe property

Default folders we install.
protected static array $folders
return array