nouvu / config
Config PHP 8.0
v4.2.2
2022-06-13 10:48 UTC
Requires
- php: >=8.0
README
composer require nouvu/config
| Method | Description |
|---|---|
| set( string | int | null $offset, mixed $value ): void | set values |
| add( string | int | null $offset, array $value, bool $before = false ): void | add values |
| get( string | int | null $offset, mixed $default = null ): mixed | get value(s) |
| has( string | int $offset ): bool | has offset |
// [ 'nouvu/config' ] $config = new \Nouvu\Config\Config( config: [ 'nouvu/config' ], separator: '.' ); // [ 'nouvu/config', 'Nouvu\\Config\\Config' ] $config -> set( null, [ $config :: class ] ); // [ 'nouvu/config', 'Nouvu\\Config\\Config', 'a' => 'b' ] $config -> add( null, [ 'a' => 'b' ] ); $config -> get( 'a' ); // b