From 110dc2831488937c1afb70c11657a341912fc8cd Mon Sep 17 00:00:00 2001 From: Peter Nguyen Date: Wed, 5 Feb 2025 00:44:12 -0600 Subject: Initial commit 2/25/2025 --- vendor/vlucas/phpdotenv/src/Store/FileStore.php | 72 +++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 vendor/vlucas/phpdotenv/src/Store/FileStore.php (limited to 'vendor/vlucas/phpdotenv/src/Store/FileStore.php') diff --git a/vendor/vlucas/phpdotenv/src/Store/FileStore.php b/vendor/vlucas/phpdotenv/src/Store/FileStore.php new file mode 100644 index 0000000..e7a4d3f --- /dev/null +++ b/vendor/vlucas/phpdotenv/src/Store/FileStore.php @@ -0,0 +1,72 @@ +filePaths = $filePaths; + $this->shortCircuit = $shortCircuit; + $this->fileEncoding = $fileEncoding; + } + + /** + * Read the content of the environment file(s). + * + * @throws \Dotenv\Exception\InvalidEncodingException|\Dotenv\Exception\InvalidPathException + * + * @return string + */ + public function read() + { + if ($this->filePaths === []) { + throw new InvalidPathException('At least one environment file path must be provided.'); + } + + $contents = Reader::read($this->filePaths, $this->shortCircuit, $this->fileEncoding); + + if (\count($contents) > 0) { + return \implode("\n", $contents); + } + + throw new InvalidPathException( + \sprintf('Unable to read any of the environment file(s) at [%s].', \implode(', ', $this->filePaths)) + ); + } +} -- cgit v1.2.3