mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Update dependencies + cp vendor/*/src src/
This commit is contained in:
59
src/Dotenv/Parser/Entry.php
Normal file
59
src/Dotenv/Parser/Entry.php
Normal file
@@ -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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user