t4web/site-config 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

t4web/site-config

最新稳定版本:2.0.3

Composer 安装命令:

composer require t4web/site-config

包简介

Admin module for ZF2. Provide key-value configuration

README 文档

README

ZF2 Module. Site config module - provide key-value configuration.

Installation

Main Setup

By cloning project

Clone this project into your ./vendor/ directory.

With composer

  1. Now tell composer to download SiteConfig by running the command:
$ composer require t4web/site-config:"~2.0.0"
  1. Create tables by initial script:
$ php public/index.php site-config init

Post installation

  1. Enabling it in your application.config.phpfile.
<?php
return array(
    'modules' => array(
        // ...
        'T4web\SiteConfig',
    ),
    // ...
);

Quick start

Insert scopes and values to tables site_config_values and site_config_scopes:

INSERT INTO `site_config_scopes` (`id`, `name`) 
VALUES (1, 'products');

INSERT INTO `site_config_values` (`id`, `scope_id`, `name`, `value`) 
VALUES (1, 1, 'items-per-page', 20);

Use it anywhere

$siteConfig = $serviceLocator->get("T4web\SiteConfig\Config");
$siteConfig->get('items-per-page', 'products');
//...
$siteConfig->set('items-per-page', 'products', 10);

统计信息

  • 总下载量: 1.16k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2014-12-17