File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,9 +45,7 @@ public function __construct($path, $file = '.env')
4545 */
4646 public function load ()
4747 {
48- $ this ->loader = new Loader ($ this ->filePath , true );
49-
50- return $ this ->loader ->load ();
48+ return $ this ->getLoaderData ();
5149 }
5250
5351 /**
@@ -57,9 +55,7 @@ public function load()
5755 */
5856 public function overload ()
5957 {
60- $ this ->loader = new Loader ($ this ->filePath , false );
61-
62- return $ this ->loader ->load ();
58+ return $ this ->getLoaderData (true );
6359 }
6460
6561 /**
@@ -80,6 +76,16 @@ protected function getFilePath($path, $file)
8076
8177 return $ filePath ;
8278 }
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+ }
8389
8490 /**
8591 * 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