Skip to content

Commit

Permalink
Added loadENV
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianFun123 committed Jul 26, 2022
1 parent b2620bc commit db51e5c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "interaapps/ulole",
"type": "library",
"version": "3.1.2",
"version": "3.1.3",
"authors": [
{
"name": "JulianFun123",
Expand Down
6 changes: 6 additions & 0 deletions src/main/de/interaapps/ulole/core/config/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ public function loadPHPFile($file, $parent = null): Configuration {
return $this;
}

public function loadENV(): Configuration {
foreach (getenv() as $key => $val)
$this->configEntries[$key] = $val;
return $this;
}

public function loadENVFile($file, $parent = null): Configuration {
if (file_exists($file)) {
$envFile = file_get_contents($file);
Expand Down
2 changes: 1 addition & 1 deletion uppm.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ulole-core",
"version": "3.1.2",
"version": "3.1.3",
"repositories": [],
"run": {},
"build": {},
Expand Down

0 comments on commit db51e5c

Please sign in to comment.