PHP code example of kigkonsult / keyvaluemgr

1. Go to this page and download the library: Download kigkonsult/keyvaluemgr library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kigkonsult / keyvaluemgr example snippets

 php

namespace Kigkonsult\KeyValueMgr;

// set up some config

$key   = 'key';
$value = 'value;
$configDataArray = [ $key => $value ];

// set up KeyValueMgr

$cfgMgr = new KeyValueMgr();
$cfgMgr->set( $configDataArray );
$cfgMgr->set( 'key2', 'value2' );

// usage exists / get / remove

if( $cfgMgr->exists( $key ) {
   $value = $cfgMgr->get( $key );
}
$cfgMgr->remove( $key )
 php
composer 
 php
use Kigkonsult\KeyValueMgr\KeyValueMgr;
...
 php
use Kigkonsult\KeyValueMgr\KeyValueMgr;
...