PHP Class Airship\Installer\Install

Exibir arquivo Open project: paragonie/airship

Protected Properties

Property Type Description
$autoSave boolean
$csrf Airship\Engine\Security\CSRF
$data array
$db Database
$twig Twig_Environment

Public Methods

Method Description
__construct ( Twig_Environment $twig, array $data = [] ) Install constructor.
__destruct ( ) Save configuration on destruct
currentStep ( ) This is the landing point for the current step in the installation process.
isPasswordWeak ( array $post ) : boolean Is this password too weak?

Protected Methods

Method Description
databaseFinalPgsql ( ) Reset the sequence values.
display ( string $template ) : boolean Render a template
enumerateDrivers ( ) : array This method is where we will detect and enumerate all of our supported drivers.
fastFinish ( array $post ) : array
finalConfigCabins ( Twig_Environment $twig ) : string Get the data for the cabins.json file
finalConfigDatabases ( Twig_Environment $twig ) : string Get the data for the databases.json file
finalConfigUniversal ( Twig_Environment $twig ) : string Get the data for the universal.json file
finalConfiguration ( ) Save all of the necessary configuration files
finalDatabasePrimary ( ) : Database Get the primary database (part of the finalize process)
finalDatabaseSetup ( ) Set up the database tables, views, etc.
finalDefaultPages ( ) Create the default pages (about, contact).
finalProcessAdminAccount ( ) Create the admin user account
finalShutdown ( ) The last phase of the installer
finalize ( array $post = [] ) Finalize the install process
isHTTPS ( ) : boolean
post ( boolean $ignoreCSRFToken = false ) : array | boolean Grab post data, but only if the CSRF token is valid
processAdminAccount ( array $post = [] ) Store your admin account credentials.
processCabins ( array $post = [] ) Store our database configuration information, then proceed to step 2.
processConfig ( array $post = [] ) Store our database configuration information, then proceed to step 2.
processDatabase ( array $post = [] ) Store our database configuration information, then proceed to step 2.
testForTor ( ) This will attempt to connect to a Tor Hidden Service, to see if Tor is available for use.

Method Details

__construct() public method

Install constructor.
public __construct ( Twig_Environment $twig, array $data = [] )
$twig Twig_Environment
$data array

__destruct() public method

Save configuration on destruct
public __destruct ( )

currentStep() public method

This is the landing point for the current step in the installation process.
public currentStep ( )

databaseFinalPgsql() protected method

Reset the sequence values.
protected databaseFinalPgsql ( )

display() protected method

Render a template
protected display ( string $template ) : boolean
$template string
return boolean

enumerateDrivers() protected method

This method is where we will detect and enumerate all of our supported drivers.
protected enumerateDrivers ( ) : array
return array

fastFinish() protected method

protected fastFinish ( array $post ) : array
$post array
return array

finalConfigCabins() protected method

This is in a separate method so it can be unit tested
protected finalConfigCabins ( Twig_Environment $twig ) : string
$twig Twig_Environment
return string

finalConfigDatabases() protected method

This is in a separate method so it can be unit tested
protected finalConfigDatabases ( Twig_Environment $twig ) : string
$twig Twig_Environment
return string

finalConfigUniversal() protected method

This is in a separate method so it can be unit tested
protected finalConfigUniversal ( Twig_Environment $twig ) : string
$twig Twig_Environment
return string

finalConfiguration() protected method

Save all of the necessary configuration files
protected finalConfiguration ( )

finalDatabasePrimary() protected method

Get the primary database (part of the finalize process)
protected finalDatabasePrimary ( ) : Database
return Database

finalDatabaseSetup() protected method

Set up the database tables, views, etc.
protected finalDatabaseSetup ( )

finalDefaultPages() protected method

Create the default pages (about, contact).
protected finalDefaultPages ( )

finalProcessAdminAccount() protected method

Create the admin user account
protected finalProcessAdminAccount ( )

finalShutdown() protected method

The last phase of the installer
protected finalShutdown ( )

finalize() protected method

Finalize the install process
protected finalize ( array $post = [] )
$post array

isHTTPS() protected method

protected isHTTPS ( ) : boolean
return boolean

isPasswordWeak() public method

Is this password too weak?
public isPasswordWeak ( array $post ) : boolean
$post array
return boolean

post() protected method

Grab post data, but only if the CSRF token is valid
protected post ( boolean $ignoreCSRFToken = false ) : array | boolean
$ignoreCSRFToken boolean - Don't validate CSRF tokens
return array | boolean

processAdminAccount() protected method

Store your admin account credentials.
protected processAdminAccount ( array $post = [] )
$post array

processCabins() protected method

Store our database configuration information, then proceed to step 2.
protected processCabins ( array $post = [] )
$post array

processConfig() protected method

Store our database configuration information, then proceed to step 2.
protected processConfig ( array $post = [] )
$post array

processDatabase() protected method

Store our database configuration information, then proceed to step 2.
protected processDatabase ( array $post = [] )
$post array

testForTor() protected method

This will attempt to connect to a Tor Hidden Service, to see if Tor is available for use.
protected testForTor ( )

Property Details

$autoSave protected_oe property

protected bool $autoSave
return boolean

$csrf protected_oe property

protected CSRF,Airship\Engine\Security $csrf
return Airship\Engine\Security\CSRF

$data protected_oe property

protected array $data
return array

$db protected_oe property

protected Database $db
return Database

$twig protected_oe property

protected Twig_Environment $twig
return Twig_Environment