Config API v2.1.0
New version
This is not a breacking changes but a little refactoring was made for implementing the new API for searching array sub keys.
Now $config->has( $key )
and $config->get( $key )
can find sub values on the array storage with dot separator $config->get( 'key.subkey' )
.
Only the $config->push( $key, $value )
is deprecated in favour of $config->add( $key, $value )
New methods
$config->toArray()
// Return the array storage
$config->toJson()
// Return the json of the array storage
Only for internal use you can also call the array_* builtin functions like this
$config->array_keys()
// Return all storage keys
Remeber that this is not ready for production.
New interface and factory to use
use ItalyStrap\Config\ConfigInterface
and
ConfigFactory::make( $arr, $aar1 );
The old Config_Interface
and Config_Factory
are deprecated for PSR compatibility