Skip to content

Latest commit

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Promise Component Config

Manage Promise configuration by persistent storage.

Installing

composer require ofcold/component-config

Useing

$config = newOfcold\Component\Config\Repository// Set initial configuration items$config->addNamespace('your-config-path');
// Add a namespace to configuration.$config->addNamespace(__DIR__'/your-path/config', 'user');
// Get a config item.$config->get('foo');
// Get a namespace config item.$config->get('user::foo.bar');

Api

MethodDescription
addNamespace(string $directory, ?string $namespace = null): voidAdd a namespace to configuration.
has($key): boolDetermine if the given configuration value exists.
get($key, $default = null)Get the specified configuration value.
getMany(array $keys): arrayGet many configuration values.
set($key, $value = null): voidSet a given configuration value.
prepend($key, $value): voidPrepend a value onto an array configuration value.
push($key, $value): voidPush a value onto an array configuration value.
all(): arrayGet all of the configuration items for the application..

About

Manage Ofcold configuration by persistent storage.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages