PHP code example of foreverglory / setting-bundle

1. Go to this page and download the library: Download foreverglory/setting-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/ */

    

foreverglory / setting-bundle example snippets


//app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Glory\Bundle\SettingBundle\GlorySettingBundle(),
        // ...
    );
}

$settingManager = $container->get('glory_setting.manager');

$settingManager->value('name');
$settingManager->value('name','default-value');

$settingManager->value('name.key');
$settingManager->value('name.key','default-value');

$settingManager->save('name','value');
$settingManager->save('name',array('key'=>'value'));