From 5e93f0036c6157c6588483fb3abac60b8f22cab5 Mon Sep 17 00:00:00 2001 From: Sparks1998 <48773842+Sparks1998@users.noreply.github.com> Date: Mon, 12 Aug 2019 15:44:54 +0300 Subject: [PATCH] Update SecureEnvPHP.php --- src/SecureEnvPHP.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/SecureEnvPHP.php b/src/SecureEnvPHP.php index 719aa26..4821b76 100644 --- a/src/SecureEnvPHP.php +++ b/src/SecureEnvPHP.php @@ -16,4 +16,13 @@ public function parse(string $path = Constants::ENV_ENC, string $secret = '', st } } } + + public function clearEnv () + { + foreach ( $_ENV as $key => $value ) { + if ( strpos ( $key , "DB_" ) > -1 ) { + putenv ( "$key" ); + } + } + } }