PHP Class Devise\Support\Config\EnvironmentFileManager

Afficher le fichier Open project: devisephp/cms

Méthodes publiques

Méthode Description
__construct ( Framework $Framework, $envFile = null ) Create a new settings manager
createIfNotExists ( ) : void Checks for existence of .env file, if not it creates a new one.
get ( string $file = null, boolean $settingsOnly = true ) : array Extract the settings from the env file it should be in format DB_HOST=something and take up no more than one line
merge ( array $settings ) : [type] Merge in environment settings
save ( array $settings ) : array This will save the settings to the env file

Method Details

__construct() public méthode

Create a new settings manager
public __construct ( Framework $Framework, $envFile = null )
$Framework Devise\Support\Framework

createIfNotExists() public méthode

Checks for existence of .env file, if not it creates a new one.
public createIfNotExists ( ) : void
Résultat void

get() public méthode

Extract the settings from the env file it should be in format DB_HOST=something and take up no more than one line
public get ( string $file = null, boolean $settingsOnly = true ) : array
$file string
$settingsOnly boolean
Résultat array

merge() public méthode

Merge in environment settings
public merge ( array $settings ) : [type]
$settings array
Résultat [type]

save() public méthode

This will save the settings to the env file
public save ( array $settings ) : array
$settings array
Résultat array