承接 gridonic/database-utils-service-provider 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

gridonic/database-utils-service-provider

Composer 安装命令:

composer require gridonic/database-utils-service-provider

包简介

Database utilities service provider for Silex. Includes some database commands and adds fixtures for your database.

README 文档

README

Build Status

This is a simple collection of utilities for your database for Silex and Doctrine DBAL.

Install

As usual, just include gridonic/database-utils-service-provider in your composer.json , and register the service.

$app->register(new \Gridonic\Provider\DatabaseUtilsServiceProvider(), array(
    'database_utils.fixtures'       => PATH_RESOURCES . '/fixtures/*.yml',
    'database_utils.password_keys'  => array('password'),
    'database_utils.security.salt'  => 'abcd',
));

Parameters

An overview of the possible parameters

database_utils.fixtures

required for fixtures All your fixtures-files.

database_utils.password_keys

optional An array of keys of table-columns, in which you are saving passwords. The values will be automatically encoded before insert.

database_utils.security.salt

required for database_utils.password_keys To encode the passwords, we use this salt.

Commands

When you have registered the ConsoleServiceProvider correct, you can use the following commands in your console.

database:drop

Clears your database

database:reset

Resets your database. Means:

database:fixtures:load

Loads example-data from your fixtures-files into the database.

when you set the password_keys and the salt, all the values for the password_keys (p.E. 1234 as password) will be encoded before insert. All the passwords will be encoded by the Silex\Provider\SecurityProvider. You have to register the SecurityProvider before you can use this function.

Example 01_test.yml

test:
    -
        id: 1
        created: 1000000000
        username: abc
        email: abc@abc.com
        password: 1234
    -
        id: 2
        created: 1000000001
        username: def
        email: def@abc.com
        password: 1234

Example to register the SecurityProvider

$app->register(new Silex\Provider\SecurityServiceProvider(), array(
    'security.firewalls' => array(
        'private' => array(
            'pattern' => '^/admin',
            'http' => true,
            'users' => array(
                'admin' => array('ROLE_ADMIN', 'ASv5vPSea0zB3EIpIB/mLOFAxkMIfh1EkTozyenPTZa0mGAiTC3n+mCAEdcYiITruuPaFb6GWFDiyF5fvJtqOg=='),
            ),
        ),
    ),
));

Licence

The DatabaseUtilsServiceProvider is licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-08-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固