2017 © Pedro Peláez
 

library rcm-config

Extend the functionality of ZF2 config as well as allow config sources to be changed

image

reliv/rcm-config

Extend the functionality of ZF2 config as well as allow config sources to be changed

  • Tuesday, August 22, 2017
  • by reliv
  • Repository
  • 7 Watchers
  • 0 Stars
  • 384 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 12 Versions
  • 0 % Grown

The README.md

RCM Config

Module title:

RCM Config, (*1)

Module description:

Extend the functionality of ZF2 config as well as allow config sources to be changed, (*2)

  • Models my be written and injected to pull from any source by category
  • ZF2 ConfigModel and Doctine ConfigModel is available by default
  • Allows for config sources to be changed without impact to existing code
  • Allows for a standard for storing config values
Config Example:
<?php
    // Example of a config array as might be defined in ZF2 config
    'Reliv\RcmConfig' => [
        'myCategory' => [
            '_DEFAULT' => [
                'myPropertyName1' => 'my value',
                'myPropertyName2' => ['my value1', 'my value2'],
            ],
            'myContext' => [
                'myPropertyName1' => 'my value over-ride',
            ]
        ]
    ],
    // Example of defining a model for a category
    'Reliv\RcmConfig\Models' => [
        'myCategory' => \Reliv\RcmConfig\Model\ConfigModel::class,
    ],
Usage Example
<?php
    /** Using /Zend\ServiceManager/ServiceManager as $serviceLocator */

    $configService = $serviceLocator->get(\Reliv\RcmConfig\Service\ConfigService::class);

    $value = $configService->getValue(
        'myCategory',
        'myContext',
        'myPropertyName1'
    );
    /** Outputs: 'my value over-ride' */
    var_dump($value);

    $value = $configService->getValue(
        'myCategory',
        'myContext',
        'myPropertyName2'
    );
    /** Outputs: ['my value1', 'my value2'] */
    var_dump($value);

    /** Other Methods */
    var_dump(
        'getList',
        $cs->getList('myCategory'),
        'getAll',
        $cs->getAll('myCategory', 'myContext'),
        'getDefault',
        $cs->getDefault('myCategory'),
        'getListValue',
        $cs->getListValue('myCategory', 'myPropertyName1'),
        'getPrimary',
        $cs->getPrimary('myCategory', 'myContext')
    );
Project author:

James Jervis, (*3)

jjervis@relivinc.com, (*4)

https://github.com/reliv/rcm-config, (*5)

Copyright (c) 2015, Reliv' International, (*6)

The Versions

22/08 2017

dev-master

9999999-dev https://github.com/reliv/rcm-config

Extend the functionality of ZF2 config as well as allow config sources to be changed

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

config zf2 module rcm

22/08 2017

1.1.0

1.1.0.0 https://github.com/reliv/rcm-config

Extend the functionality of ZF2 config as well as allow config sources to be changed

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

config zf2 module rcm

19/12 2016

1.0.5

1.0.5.0 https://github.com/reliv/rcm-config

Extend the functionality of ZF2 config as well as allow config sources to be changed

  Sources   Download

BSD-3-Clause

The Requires

 

config zf2 module rcm

06/07 2016

1.0.4

1.0.4.0 https://github.com/reliv/rcm-config

Extend the functionality of ZF2 config as well as allow config sources to be changed

  Sources   Download

BSD-3-Clause

The Requires

 

config zf2 module rcm

24/11 2015

1.0.3

1.0.3.0 https://github.com/reliv/rcm-config

Extend the functionality of ZF2 config as well as allow config sources to be changed

  Sources   Download

BSD-3-Clause

The Requires

 

config zf2 module rcm

24/11 2015

1.0.2

1.0.2.0 https://github.com/reliv/rcm-config

Extend the functionality of ZF2 config as well as allow config sources to be changed

  Sources   Download

BSD-3-Clause

The Requires

 

config zf2 module rcm

18/11 2015

1.0.1

1.0.1.0 https://github.com/reliv/rcm-config

Extend the functionality of ZF2 config as well as allow config sources to be changed

  Sources   Download

BSD-3-Clause

The Requires

 

config zf2 module rcm

18/11 2015

1.0.0

1.0.0.0 https://github.com/reliv/rcm-config

Extend the functionality of ZF2 config as well as allow config sources to be changed

  Sources   Download

BSD-3-Clause

The Requires

 

config zf2 module rcm

16/10 2015

0.3.0

0.3.0.0 https://github.com/reliv/rcm-config

Extend the functionality of ZF2 config as well as allow config sources to be changed

  Sources   Download

BSD-3-Clause

The Requires

 

config zf2 module rcm

12/08 2015

0.0.2

0.0.2.0 https://github.com/reliv/rcm-config

Extend the functionality of ZF2 config as well as allow config sources to be changed

  Sources   Download

BSD-3-Clause

The Requires

 

config zf2 module rcm

11/08 2015

0.0.1

0.0.1.0 https://github.com/reliv/rcm-config

Extend the functionality of ZF2 config as well as allow config sources to be changed

  Sources   Download

BSD-3-Clause

The Requires

 

config zf2 module rcm

11/08 2015

0.0.0

0.0.0.0 https://github.com/reliv/rcm-config

Extend the functionality of ZF2 config as well as allow config sources to be changed

  Sources   Download

BSD-3-Clause

The Requires

 

config zf2 module rcm