2022-08-19 19:48:37 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace Dotenv\Repository\Adapter;
|
|
|
|
|
|
|
|
|
|
interface WriterInterface
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Write to an environment variable, if possible.
|
|
|
|
|
*
|
2022-11-28 19:11:12 +08:00
|
|
|
* @param non-empty-string $name
|
|
|
|
|
* @param string $value
|
2022-08-19 19:48:37 +08:00
|
|
|
*
|
|
|
|
|
* @return bool
|
|
|
|
|
*/
|
|
|
|
|
public function write(string $name, string $value);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Delete an environment variable, if possible.
|
|
|
|
|
*
|
2022-11-28 19:11:12 +08:00
|
|
|
* @param non-empty-string $name
|
2022-08-19 19:48:37 +08:00
|
|
|
*
|
|
|
|
|
* @return bool
|
|
|
|
|
*/
|
|
|
|
|
public function delete(string $name);
|
|
|
|
|
}
|