italystrap / config
ItalyStrap Config Module - a simple and useful configuration package the OOP way
Installs: 2 112
Dependents: 10
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 2
Requires
- php: >=7.4
- italystrap/storage: ^1.0.0
Requires (Dev)
- codeception/module-asserts: ^1.0
- dealerdirect/phpcodesniffer-composer-installer: ^0.7.2
- humanmade/psalm-plugin-wordpress: ^2.0.3
- infection/codeception-adapter: ^0.4.1
- infection/infection: ^0.26.6
- italystrap/debug: ^2.1
- italystrap/event: dev-master
- italystrap/storage-tests: dev-master
- lucatume/function-mocker-le: ^1.0
- lucatume/wp-browser: ^3.1
- phpbench/phpbench: ^1.2
- phpcompatibility/php-compatibility: ^9.3
- phpmetrics/phpmetrics: ^2.8
- phpspec/prophecy-phpunit: ^2.0
- rector/rector: ^0.15.17
- squizlabs/php_codesniffer: ^3.7
- vimeo/psalm: ^4.26
Suggests
- italystrap/event: EventDispatcher for WordPress
README
ItalyStrap Config Module - a simple and useful configuration package the OOP way
Table Of Contents
Installation
The best way to use this package is through Composer:
composer require italystrap/config
Basic Usage
use ItalyStrap\Config\Config; $config = new Config($configObjOrArrayOptional, $configDefaultOptional); $value = $config->get('key', $optionalDefaultValue);
Advanced Usage
You can see more advanced example in the tests' folder.
Deprecation
List of all deprecated method that will be removed in the next major release.
Config::push()
=>Config::set()
Config::add()
=>Config::set()
Config::remove()
=>Config::delete()
Config::all()
=>Config::toArray()
ConfigThemeMods::class
Contributing
All feedback / bug reports / pull requests are welcome.
License
Copyright (c) 2019 Enea Overclokk, ItalyStrap
This code is licensed under the MIT.
Credits
Ideas for the Config::class from:
For the Notation Array Search:
For some ideas: