2017 © Pedro Peláez
 

yii2-extension yii2-lazy-params

Yii2 lazy params

image

zlakomanoff/yii2-lazy-params

Yii2 lazy params

  • Tuesday, May 16, 2017
  • by zlakomanoff
  • Repository
  • 1 Watchers
  • 0 Stars
  • 726 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 30 % Grown

The README.md

Yii2 lazy params

Yii2 zlay params, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist zlakomanoff/yii2-lazy-params "*"

or add, (*4)

"zlakomanoff/yii2-lazy-params": "*"

to the require section of your composer.json file., (*5)

Usage

Simple config, (*6)

'lp' => 'zlakomanoff\lazyparams\Component'

Simple usage, (*7)

<?= Yii::$app->lp->get('option', 'default value') ?>

Advanced config, (*8)

'lp' => [
    'class' => 'zlakomanoff\lazyparams\Component',
    'tableName' => 'dynamic_options',
    'keyColumn' => 'keyword',
    'valueColumn' => 'value',
    'liquidMode' => false,
    'enableCache' => false,
    'cacheDefaultValues' => false,
    'cacheComponent' => 'cache',
    'dbComponent' => 'db'
]

Advanced usage, (*9)

echo Yii::$app->lp['param one'];
echo Yii::$app->lp['param two']['default value'];
echo Yii::$app->lp->paramThree('default value');
echo Yii::$app->lp->get('param four', 'default value');

The Versions

16/05 2017

dev-master

9999999-dev

Yii2 lazy params

  Sources   Download

MIT

The Requires

 

by Zlakomanov Alexander

extension yii2

16/05 2017

v1.0.0

1.0.0.0

Yii2 lazy params

  Sources   Download

MIT

The Requires

 

by Zlakomanov Alexander

extension yii2