(Refactor) Remove getEnvironmentValue, rename setEnvironmentValue to setenv to match php defaults
This commit is contained in:
parent
efd61fb376
commit
ef1ec46bad
|
@ -129,22 +129,12 @@ function checkExtensions(): array
|
||||||
* @param string $envValue The environment variable to set
|
* @param string $envValue The environment variable to set
|
||||||
* @return bool true on success or false on failure.
|
* @return bool true on success or false on failure.
|
||||||
*/
|
*/
|
||||||
function setEnvironmentValue(string $envKey, $envValue)
|
function setenv(string $envKey, $envValue)
|
||||||
{
|
{
|
||||||
$str = "{$envKey}={$envValue}";
|
$str = "{$envKey}={$envValue}";
|
||||||
return putenv($str);
|
return putenv($str);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the variable from the env file
|
|
||||||
* @param string $envKey The environment variable to look for
|
|
||||||
* @return array|false|string Returns the value if found, otherwise returns false.
|
|
||||||
*/
|
|
||||||
function getEnvironmentValue(string $envKey): array|false|string
|
|
||||||
{
|
|
||||||
return getenv($envKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encrypt the given value
|
* Encrypt the given value
|
||||||
|
|
Loading…
Reference in a new issue