StringStore.php 589 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. declare(strict_types=1);
  3. namespace Dotenv\Store;
  4. final class StringStore implements StoreInterface
  5. {
  6. /**
  7. * The file content.
  8. *
  9. * @var string
  10. */
  11. private $content;
  12. /**
  13. * Create a new string store instance.
  14. *
  15. * @param string $content
  16. *
  17. * @return void
  18. */
  19. public function __construct(string $content)
  20. {
  21. $this->content = $content;
  22. }
  23. /**
  24. * Read the content of the environment file(s).
  25. *
  26. * @return string
  27. */
  28. public function read()
  29. {
  30. return $this->content;
  31. }
  32. }