2017 © Pedro Peláez
 

yii2-extension yii2-settings

Yii2 settings component

image

pendalf89/yii2-settings

Yii2 settings component

  • Monday, November 17, 2014
  • by PendalF89
  • Repository
  • 1 Watchers
  • 5 Stars
  • 37 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

yii2-settings

Yii2 settings component, (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist pendalf89/yii2-settings "*"

or add, (*4)

"pendalf89/yii2-settings": "*"

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

Apply migration, (*6)

yii migrate --migrationPath=vendor/pendalf89/yii2-settings/migrations

Configuration:, (*7)

'components' => [
    'settings' => [
        'class' => 'pendalf89\settings\Settings',
    ],
],

Usage

$settings = Yii::$app->settings;
$settings->set('sitemap.update_cache_freq', 21600);
echo $settings->get('sitemap.update_cache_freq');  // 21600

// Sample with default value:
echo $settings->get('sitemap.update_cache_freq', 21600);  // 21600

The Versions

17/11 2014

dev-master

9999999-dev

Yii2 settings component

  Sources   Download

GNU GPLv2

by PendalF