2017 © Pedro Peláez
 

library zenenv

A package for editing the .env file

image

zenlix/zenenv

A package for editing the .env file

  • Monday, July 25, 2016
  • by zenlix
  • Repository
  • 1 Watchers
  • 1 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 47 % Grown

The README.md

License Total Downloads, (*1)

ZenEnv

PHP class that helps work with .env

Install, (*2)

composer require zenlix/zenenv

Use, (*3)

use ZenEnv\ZenEnv;

Initializing ZenEnv, (*4)

$env = new ZenEnv('/home/rustem/web/public_html/.env');

Get array of key/values, (*5)

$env->get();

Result:, (*6)

print_r($env-get());

```php ['PARAM1'=>'VALUE1','PARAM2'=>'VALUE2'], (*7)



Delete by keys ```php $env->delete(['KEY1', 'KEY2']);

Before:, (*8)

PARAM1=VALUE1
PARAM2=VALUE2
PARAM3=VALUE3

After:, (*9)

PARAM3=VALUE3

Add key/value, (*10)

$env->add([
'KEY'=>'VAL',
'KEY2'=>'VAL2'
]);

Before:, (*11)

PARAM1=VALUE1
PARAM2=VALUE2
PARAM3=VALUE3

After:, (*12)

PARAM1=VALUE1
PARAM2=VALUE2
PARAM3=VALUE3
KEY=VAL
KEY2=VAL2

Change key/value, (*13)

$env->set([
'PARAM1'=>'VALUE',
'PARAM2'=>'VALUE'
]);

Before:, (*14)

PARAM1=VALUE1
PARAM2=VALUE2
PARAM3=VALUE3

After:, (*15)

PARAM1=VALUE
PARAM2=VALUE
PARAM3=VALUE3

The Versions

25/07 2016

dev-master

9999999-dev

A package for editing the .env file

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by Yaroslav Snisar

dotenv dotenv-editor

25/07 2016

1.4

1.4.0.0

A package for editing the .env file

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by Yaroslav Snisar

dotenv dotenv-editor

20/07 2016

1.2

1.2.0.0

A package for editing the .env file

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by Yaroslav Snisar

dotenv dotenv-editor

20/07 2016

1.0

1.0.0.0

A package for editing the .env file

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by Yaroslav Snisar

dotenv dotenv-editor