Download the PHP package navindex/simple-config without Composer
On this page you can find all versions of the php package navindex/simple-config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download navindex/simple-config
More information about navindex/simple-config
Files in navindex/simple-config
Download navindex/simple-config
More information about navindex/simple-config
Files in navindex/simple-config
Vendor navindex
Package simple-config
Short Description Simple library to create and modify a configuration structure.
License MIT
Homepage https://github.com/balinomad/simple-config
Package simple-config
Short Description Simple library to create and modify a configuration structure.
License MIT
Homepage https://github.com/balinomad/simple-config
Please rate this library. Is it a good library?
Informations about the package simple-config
Simple config 
1. What Is It
Simple config is a class to work with configuration settings. It helps you to perform actions like add, remove, check, append, subtract etc. by using dot notation keys.
2. What Is It Not
This library does not read the filesystem or other environment settings. To use an .env file to feed Simple config, use it together with phpdotenv or other similar library.
3. Installation
This package can be installed through Composer.
4. Usage
5. Actions
Method | Attributes | Returns | Description |
---|---|---|---|
constructor | $config | - | Constructor. |
get | $key, $default | mixed | Retrieves a configuration value using dot notation. |
set | $key, $value | self | Sets a configuration value using dot notation. |
has | $key | boolean | Checks if a key exists using dot notation. |
unset | $key | self | Removes a key using dot notation and cleans up empty parent arrays. |
append | $key, $value | self | Appends value(s) to an array at the specified key. |
subtract | $key, $value | self | Subtracts value(s) from an array at the specified key. |
merge | $config, $method | self | Merges another configuration array or Config object. |
split | $key | Config | Returns a new Config instance for a specific key. |
toArray | - | array | Returns the entire configuration as an array. |
__serialize | - | string | Magic method for serializing the object. |
__unserialize | $data | - | Magic method for restoring the configuration from a given serialized array. |
offsetExists | $offset | bool | Checks if the specified offset exists. |
offsetGet | $offset | mixed | Retrieves the value at the specified offset. |
offsetSet | $offset, $value | void | Sets the value at the specified offset. |
offsetUnset | $offset | void | Removes the value associated with the given offset. |
count | - | int | Counts all leaf configuration values. |
getIterator | - | Traversable | An iterator implementing the Traversable interface, allowing iteration over the configuration items. |
wrap | $value | array | Static. Wraps a value in an array unless it is already an array. |
isAssoc | $array | boolean | Static. Heuristically determines if an array is associative. |
All versions of simple-config with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.1
The package navindex/simple-config contains the following files
Loading the files please wait ....