nouvu/config

v4.2.2 2022-06-13 10:48 UTC

This package is auto-updated.

Last update: 2024-04-13 14:40:00 UTC


README

Latest Unstable Version License

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