1. Go to this page and download the library: Download bluesteel42/settings-bundle 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/ */
bluesteel42 / settings-bundle example snippets
// app/AppKernel.php
public function registerBundles()
{
// ...
$bundles[] = new BlueSteel42\SettingsBundle\BlueSteel42SettingsBundle();
}
-memcached
// Get the service
$service = $this->get('bluesteel42.settings');
// Get a key
$value = $service->get('my_key');
// Get a subkey
$subValue = $service->get('second_key.sub_key.third_level_key');
// Get a key with a default value if not found
$items_per_page = $service->get('items_per_page', 10);
// Set a key
$service->set('items_per_page', 20);
// Set a subkey
$service->set('my_key.sub_key','subval1');