/home/techb158/immovalet.com/vendor/vlucas/phpdotenv/src/Repository/Adapter
NameSizeModeActions
AdapterInterface.php3460644editdlrm
ApacheAdapter.php19340644editdlrm
ArrayAdapter.php15700644editdlrm
EnvConstAdapter.php18220644editdlrm
GuardedWriter.php18350644editdlrm
ImmutableWriter.php25020644editdlrm
MultiReader.php9590644editdlrm
MultiWriter.php12700644editdlrm
PutenvAdapter.php18530644editdlrm
ReaderInterface.php2900644editdlrm
ReplacingWriter.php21710644editdlrm
ServerConstAdapter.php18370644editdlrm
WriterInterface.php4880644editdlrm
Edit: /home/techb158/immovalet.com/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReplacingWriter.php (2171B)
*/ private $seen; /** * Create a new replacement writer instance. * * @param \Dotenv\Repository\Adapter\WriterInterface $writer * @param \Dotenv\Repository\Adapter\ReaderInterface $reader * * @return void */ public function __construct(WriterInterface $writer, ReaderInterface $reader) { $this->writer = $writer; $this->reader = $reader; $this->seen = []; } /** * Write to an environment variable, if possible. * * @param string $name * @param string $value * * @return bool */ public function write(string $name, string $value) { if ($this->exists($name)) { return $this->writer->write($name, $value); } // succeed if nothing to do return true; } /** * Delete an environment variable, if possible. * * @param string $name * * @return bool */ public function delete(string $name) { if ($this->exists($name)) { return $this->writer->delete($name); } // succeed if nothing to do return true; } /** * Does the given environment variable exist. * * Returns true if it currently exists, or existed at any point in the past * that we are aware of. * * @param string $name * * @return bool */ private function exists(string $name) { if (isset($this->seen[$name])) { return true; } if ($this->reader->read($name)->isDefined()) { $this->seen[$name] = ''; return true; } return false; } }