src/Leevel/Option/Load.php
protected function loadEnvData(IApp $app): array
    {
        $oldEnv = $_ENV;
        $_ENV = [];

        try {
            (new Dotenv($app->envPath(), $app->envFile()))->overload();
        } catch (InvalidPathException $e) {
            throw new RuntimeException($e->getMessage());
        } catch (InvalidFileException $e) {
            throw new RuntimeException($e->getMessage());
        }

        $result = $_ENV;
        $_ENV = array_merge($oldEnv, $_ENV);

        return $result;
    }
protected function loadEnvData(IApp $app): array
    {
        $oldEnv = $_ENV;
        $_ENV = [];

        try {
            (new Dotenv($app->envPath(), $app->envFile()))->overload();
        } catch (InvalidPathException $e) {
            throw new RuntimeException($e->getMessage());
        } catch (InvalidFileException $e) {
            throw new RuntimeException($e->getMessage());
        }

        $result = $_ENV;
        $_ENV = array_merge($oldEnv, $_ENV);

        return $result;
    }
载入环境变量数据.

@param \Leevel\Kernel\IApp $app

@return array