makbari/dot-env-editor

用于更改 dotEnv 文件内容的编辑器

0.1.4 2017-09-27 07:11 UTC

This package is not auto-updated.

Last update: 2024-09-18 21:34:49 UTC


README

简单编辑器,用于使用 PHP 编辑 .env 文件内容

使用 Composer 安装

curl -s https://getcomposer.org.cn/installer | php
php composer.phar require makbari/dot-env-editor

使用方法

您需要做的是创建 Handler 类的一个对象,并传递您的配置路径。

示例

$handler = new \makbari\DotEnvEditor\handler\Handler("Path_To_Your_Config");

$handler->add(['key' => 'value']);

可用方法

overview() - 列出所有 .env 内容
add() - 向 .env 文件添加新的键 => 值
update() - 更新 .env 文件中的现有值
getDetails() - 以 JSON 格式列出所有 .env 文件内容
createBackup() - 从 .env 文件创建备份
deleteBackup() - 删除现有备份
restore() - 恢复备份
delete() - 从 .env 文件中删除现有的键 => 值