Devise\Support\Config\EnvironmentFileManager::get PHP Method

get() public method

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
return array
    public function get($file = null, $settingsOnly = true)
    {
        $settings = [];
        $envFile = $file ?: $this->envFile;
        if (!file_exists($envFile)) {
            return $settings;
        }
        $contents = file_get_contents($envFile);
        $lines = explode(PHP_EOL, $contents);
        foreach ($lines as $line) {
            $lineParts = explode("=", $line);
            if (count($lineParts) == 2) {
                $key = array_shift($lineParts);
                $settings[$key] = implode('=', $lineParts);
            } else {
                if (!$settingsOnly) {
                    $settings[] = $line;
                }
            }
        }
        return $settings;
    }