diff options
| author | Peter Nguyen <peteralistairnguyen@gmail.com> | 2025-02-05 00:44:12 -0600 |
|---|---|---|
| committer | Peter Nguyen <peteralistairnguyen@gmail.com> | 2025-02-05 00:44:12 -0600 |
| commit | 110dc2831488937c1afb70c11657a341912fc8cd (patch) | |
| tree | 16b35df40e150d68344337b17c800b04b1435355 /vendor/vlucas/phpdotenv/src/Parser/Entry.php | |
Initial commit 2/25/2025
Diffstat (limited to 'vendor/vlucas/phpdotenv/src/Parser/Entry.php')
| -rw-r--r-- | vendor/vlucas/phpdotenv/src/Parser/Entry.php | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/vendor/vlucas/phpdotenv/src/Parser/Entry.php b/vendor/vlucas/phpdotenv/src/Parser/Entry.php new file mode 100644 index 0000000..716f422 --- /dev/null +++ b/vendor/vlucas/phpdotenv/src/Parser/Entry.php @@ -0,0 +1,59 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Parser; + +use PhpOption\Option; + +final class Entry +{ + /** + * The entry name. + * + * @var string + */ + private $name; + + /** + * The entry value. + * + * @var \Dotenv\Parser\Value|null + */ + private $value; + + /** + * Create a new entry instance. + * + * @param string $name + * @param \Dotenv\Parser\Value|null $value + * + * @return void + */ + public function __construct(string $name, ?Value $value = null) + { + $this->name = $name; + $this->value = $value; + } + + /** + * Get the entry name. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Get the entry value. + * + * @return \PhpOption\Option<\Dotenv\Parser\Value> + */ + public function getValue() + { + /** @var \PhpOption\Option<\Dotenv\Parser\Value> */ + return Option::fromValue($this->value); + } +} |
