File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,7 @@ public function __construct($path, $file = '.env')
45
45
*/
46
46
public function load ()
47
47
{
48
- $ this ->loader = new Loader ($ this ->filePath , true );
49
-
50
- return $ this ->loader ->load ();
48
+ return $ this ->getLoaderData ();
51
49
}
52
50
53
51
/**
@@ -57,9 +55,7 @@ public function load()
57
55
*/
58
56
public function overload ()
59
57
{
60
- $ this ->loader = new Loader ($ this ->filePath , false );
61
-
62
- return $ this ->loader ->load ();
58
+ return $ this ->getLoaderData (true );
63
59
}
64
60
65
61
/**
@@ -80,6 +76,16 @@ protected function getFilePath($path, $file)
80
76
81
77
return $ filePath ;
82
78
}
79
+
80
+ /**
81
+ * Load data from '.env'
82
+ * @return array
83
+ */
84
+ private function getLoaderData ($ overload = false )
85
+ {
86
+ $ this ->loader = new Loader ($ this ->filePath , !$ overload );
87
+ return $ this ->loader ->load ();
88
+ }
83
89
84
90
/**
85
91
* Required ensures that the specified variables exist, and returns a new Validator object.
You can’t perform that action at this time.
0 commit comments