2017 © Pedro Peláez
 

symfony-bundle settingsindbbundle

A Symfony2 bundle that allows an easy key-value storage in DB

image

marcinjozwikowski/settingsindbbundle

A Symfony2 bundle that allows an easy key-value storage in DB

  • Friday, September 9, 2016
  • by marcin-jozwikowski
  • Repository
  • 1 Watchers
  • 0 Stars
  • 36 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

SettingsInDB

A Symfony2 bundle that allows an easy key-value storage in DB, (*1)

Installation

  1. Add as composer dependency:, (*2)

    composer require marcin_jozwikowski/settings_in_db_bundle
    
  2. Add in application kernel:, (*3)

    class AppKernel extends Kernel
    {
      public function registerBundles()
      {
      //...
      $bundles[] = new \MarcinJozwikowski\SettingsInDBBundle\SettingsInDBBundle();
      return $bundles;
      }
    }
    
  3. Update database schema:, (*4)

    php app/console doctrine:schema:update --force
    

Usage

  1. Access DB stored values through service:, (*5)

    //in controller
    $val = $this->get('settings_in_db_service')->read('key', 'defaultValue');
    

Configuration

Default configuration:, (*6)

yml settings_in_db: allow_inserts: true return_null_on_not_found: false read_all_entries_at_first_use: true, (*7)

  • allow_inserts - if set to true, persists a new key-value pair if none is found
  • return_null_on_not_found - if nothing found and allow_inserts = false, returns null instead of throwing an exception
  • read_all_entries_at_first_use - if set to true loads all records at first use and searches in internal array insted of querying

The Versions

09/09 2016

dev-master

9999999-dev

A Symfony2 bundle that allows an easy key-value storage in DB

  Sources   Download

MIT

by Marcin Jóźwikowski

settings symfony2

09/09 2016

0.1.4

0.1.4.0

A Symfony2 bundle that allows an easy key-value storage in DB

  Sources   Download

MIT

by Marcin Jóźwikowski

settings symfony2

05/01 2016

0.1.3

0.1.3.0

A Symfony2 bundle that allows an easy key-value storage in DB

  Sources   Download

MIT

by Marcin Jóźwikowski

settings symfony2

05/01 2016

0.1.2

0.1.2.0

A Symfony2 bundle that allows an easy key-value storage in DB

  Sources   Download

MIT

by Marcin Jóźwikowski

settings symfony2

01/11 2015

0.1

0.1.0.0

A Symfony2 bundle that allows an easy key-value storage in DB

  Sources   Download

MIT

by Marcin Jóźwikowski

settings symfony2