PHP Класс Devise\Support\Config\EnvironmentFileManager

Показать файл Открыть проект

Открытые методы

Метод Описание
__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

Описание методов

__construct() публичный Метод

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

createIfNotExists() публичный Метод

Checks for existence of .env file, if not it creates a new one.
public createIfNotExists ( ) : void
Результат void

get() публичный Метод

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
Результат array

merge() публичный Метод

Merge in environment settings
public merge ( array $settings ) : [type]
$settings array
Результат [type]

save() публичный Метод

This will save the settings to the env file
public save ( array $settings ) : array
$settings array
Результат array