2017 © Pedro Peláez
 

library zend-config-helper

Provide Controller plugin and View helper for reading a config.

image

tasmaniski/zend-config-helper

Provide Controller plugin and View helper for reading a config.

  • Wednesday, October 12, 2016
  • by tasmaniski
  • Repository
  • 4 Watchers
  • 4 Stars
  • 1,025 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 9 % Grown

The README.md

Licence PHP version, (*1)

IMPORTANT NOTE: 
If you find this package useful, 
please click on a star button and let me know, 
so I will gladly continue with the updates.

Laminas MVC - Config Helper

Simple and small lib for reading a config array in all Controllers and all Views files., (*2)

Instalation

Add in your composer.json file:, (*3)

{
    "require": {
        "tasmaniski/laminas-config-helper": "^3.0"
    }
}

After running: composer update You need to register new module. Add in file config/application.config.php:, (*4)

'modules' => array(
    '...',
    'ConfigHelper'
),

Use

You can use it in any of your controllers or view files (including layout.phtml). First you have to add key in any of your config files (config/autoload/*) eg. "key_from_config", (*5)

//read specific key registred in your config file.
$keyFromConfig = $this->configHelp('key_from_config');

// or in new version of PHP
$keyFromConfig = $this->configHelp()->key_from_config;
$keyFromConfig = $this->configHelp()['key_from_config']; // only for 5.4+

// this will read whole config
$config = $this->configHelp(); // return config object Laminas\Config\Config
echo $config->key_from_config;

The Versions

12/10 2016

dev-master

9999999-dev https://github.com/tasmaniski/zend-config-helper

Provide Controller plugin and View helper for reading a config.

  Sources   Download

The Requires

 

by Aleksandar Varnicic

plugin config helper zend framework

12/10 2016

v2.0.0

2.0.0.0 https://github.com/tasmaniski/zend-config-helper

Provide Controller plugin and View helper for reading a config.

  Sources   Download

The Requires

 

by Aleksandar Varnicic

plugin config helper zend framework

04/10 2015

v1.0.1

1.0.1.0 https://github.com/tasmaniski/zf2-config-helper

Provide Controller plugin and View helper for reading a config.

  Sources   Download

The Requires

 

by Aleksandar Varnicic

plugin config helper zf2

30/09 2015

v1.0.0

1.0.0.0 https://github.com/tasmaniski/zf2-config-helper

Provide Controller plugin and View helper for reading a config.

  Sources   Download

The Requires

  • php >=5.3

 

by Aleksandar Varnicic

plugin config helper zf2