PHP Class Devise\Support\Installer\InstallWizard

Show file Open project: devisephp/cms

Public Properties

Property Type Description
$errors [type] [$errors description]

Protected Properties

Property Type Description
$DatabaseCreator [type] [$DatabaseCreator description]
$DvsUser [type] [$DvsUser description]
$EnvironmentFileManager [type] [$EnvironmentFileManager description]
$File [type] [$File description]
$SettingsManager [type] [$SettingsManager description]
$Validator [type] [$Validator description]

Public Methods

Method Description
__construct ( SettingsManager $SettingsManager, EnvironmentFileManager $EnvironmentFileManager, Framework $Framework, DatabaseCreator $DatabaseCreator, DeviseInstallCommand $DeviseInstallCommand, DevisePublishAssetsCommand $DevisePublishAssetsCommand, DvsUser $DvsUser, DvsGroup $DvsGroup ) Creats a new Install Wizard.
checkAssets ( ) : [type] [checkAssets description]
createAdminUser ( string $email, $username, string $password ) : DvsUser Create the admin user for the installer. This will create the user with the email and password given and then it will also put that user into the admin group
installAssets ( ) : [type] [installAssets description]
installDevise ( ) : void [installDevise description]
refreshEnvironment ( array $settings = [] ) : void Reloads env settings and also updates the configurations in Laravel for anything that might change during the install process. Things like app.key, app.debug, database stuff, mail stuff, cache and session settings.
saveApplicationMigrationAndSeedSettings ( [type] $migrations, [type] $seeds ) : [type] Save the migration and seed settings
saveApplicationNamespace ( string $appName ) : void Saves this app name
saveConfigsOverride ( $value = 'no' ) : void Save input value submitted for "configs_override" to the key "CONFIGS_OVERRIDE" in .env file
saveDatabase ( string $default, string $host, string $name, string $username, string $password ) Saves the database settings for us
saveEnvironment ( string $env ) : void Saves the environment for us
saveNewApplicationKey ( ) : void Saves the new application key if there isn't already one set We need this set early on so it doesn't screw up our tokens and password hashes.
validateAdminUser ( string $email, $username, string $password ) : void Validates the admin user data for us

Protected Methods

Method Description
createDatabaseWithSettings ( array $settings ) : boolean create the database with given settings, this will attempt to create the database with the given name. this will work for users that are using a root level access account to connect to mysql. won't work for lower level access though.
isValidDatabaseSettings ( array $settings ) : boolean see if we can connect to the database with these settings

Method Details

__construct() public method

..
public __construct ( SettingsManager $SettingsManager, EnvironmentFileManager $EnvironmentFileManager, Framework $Framework, DatabaseCreator $DatabaseCreator, DeviseInstallCommand $DeviseInstallCommand, DevisePublishAssetsCommand $DevisePublishAssetsCommand, DvsUser $DvsUser, DvsGroup $DvsGroup )
$SettingsManager Devise\Support\Config\SettingsManager
$EnvironmentFileManager Devise\Support\Config\EnvironmentFileManager
$Framework Devise\Support\Framework
$DatabaseCreator DatabaseCreator
$DeviseInstallCommand Devise\Support\Console\DeviseInstallCommand
$DevisePublishAssetsCommand Devise\Support\Console\DevisePublishAssetsCommand
$DvsUser DvsUser
$DvsGroup DvsGroup

checkAssets() public method

[checkAssets description]
public checkAssets ( ) : [type]
return [type]

createAdminUser() public method

Create the admin user for the installer. This will create the user with the email and password given and then it will also put that user into the admin group
public createAdminUser ( string $email, $username, string $password ) : DvsUser
$email string
$password string
return DvsUser

createDatabaseWithSettings() protected method

create the database with given settings, this will attempt to create the database with the given name. this will work for users that are using a root level access account to connect to mysql. won't work for lower level access though.
protected createDatabaseWithSettings ( array $settings ) : boolean
$settings array
return boolean

installAssets() public method

[installAssets description]
public installAssets ( ) : [type]
return [type]

installDevise() public method

[installDevise description]
public installDevise ( ) : void
return void

isValidDatabaseSettings() protected method

see if we can connect to the database with these settings
protected isValidDatabaseSettings ( array $settings ) : boolean
$settings array
return boolean

refreshEnvironment() public method

.. this is a hack for people who use php artisan serve ... no one else really needs this hackery...
public refreshEnvironment ( array $settings = [] ) : void
$settings array
return void

saveApplicationMigrationAndSeedSettings() public method

Save the migration and seed settings
public saveApplicationMigrationAndSeedSettings ( [type] $migrations, [type] $seeds ) : [type]
$migrations [type]
$seeds [type]
return [type]

saveApplicationNamespace() public method

Saves this app name
public saveApplicationNamespace ( string $appName ) : void
$appName string
return void

saveConfigsOverride() public method

Save input value submitted for "configs_override" to the key "CONFIGS_OVERRIDE" in .env file
public saveConfigsOverride ( $value = 'no' ) : void
return void

saveDatabase() public method

Saves the database settings for us
public saveDatabase ( string $default, string $host, string $name, string $username, string $password )
$default string
$host string
$name string
$username string
$password string

saveEnvironment() public method

Saves the environment for us
public saveEnvironment ( string $env ) : void
$env string
return void

saveNewApplicationKey() public method

Saves the new application key if there isn't already one set We need this set early on so it doesn't screw up our tokens and password hashes.
public saveNewApplicationKey ( ) : void
return void

validateAdminUser() public method

Validates the admin user data for us
public validateAdminUser ( string $email, $username, string $password ) : void
$email string
$password string
return void

Property Details

$DatabaseCreator protected property

[$DatabaseCreator description]
protected [type] $DatabaseCreator
return [type]

$DvsUser protected property

[$DvsUser description]
protected [type] $DvsUser
return [type]

$EnvironmentFileManager protected property

[$EnvironmentFileManager description]
protected [type] $EnvironmentFileManager
return [type]

$File protected property

[$File description]
protected [type] $File
return [type]

$SettingsManager protected property

[$SettingsManager description]
protected [type] $SettingsManager
return [type]

$Validator protected property

[$Validator description]
protected [type] $Validator
return [type]

$errors public property

[$errors description]
public [type] $errors
return [type]