Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
pierredup committed May 5, 2023
1 parent 8bea0fc commit 6f652dc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,21 @@ $toggle = new Toggle(new ArrayStorage($features));
$toggle = new Toggle(StorageFactory::factory($features));
```

### ENV

Reads values from environment variables.

```php
<?php

use SolidWorx\Toggler\Storage\EnvStorage;
use SolidWorx\Toggler\Toggle;

$toggle = new Toggle(new EnvStorage());

$toggle->isActive('MY_AWESOME_FEATURE'); // true if the environment variable MY_AWESOME_FEATURE is set to a truthy value
```

### YAML

In order to use yml files for config, you need to include the [Symfony Yaml Component](http://symfony.com/doc/current/components/yaml/index.html)
Expand Down

0 comments on commit 6f652dc

Please sign in to comment.