承接 tafhyseni/php-multi-tenancy 相关项目开发

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

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

tafhyseni/php-multi-tenancy

Composer 安装命令:

composer require tafhyseni/php-multi-tenancy

包简介

Handling and managing Multi Tenancy objects

README 文档

README

Latest Version on Packagist Build Status Total Downloads

Simple PHP package to help you control, create and manage Tenancy architectural databases.

Currently this works only on MySQL, but other databases will be added shortly! Also, this does work only on same hostname databases, it will also soon extended to support different hostnames..

Want to contribute.. you're welcome :)

Installation

You can install the package via composer:

composer require tafhyseni/php-multi-tenancy

Initialization

Initialization is simple as long as you do not forget to pass configuration properly

use Tafhyseni\PhpMultiTenancy\Tenancy;
$tenancy = new Tenancy(
    array(
        'hostname' => '127.0.0.1',
        'username' => 'root',
        'password' => '',
        'database' => 'test',
        'tenancy_hostname' => '127.0.0.1',
        'tenancy_username' => 'root',
        'tenancy_password' => ''
    )
);

Usage

Generating an entire tenancy schema with all tables and data

$name = $tenancy->generate(NULL, array(), true);

Generating an entire tenancy schema with only some tables and data

$name = $tenancy->generate(NULL, array('table_to_clone_1', 'table_to_clone_2'), true);

Generating an entire tenancy schema with only some tables, no data and specified tenancy name

$name = $tenancy->generate('my_tenancy_db', array('table_to_clone_1'), data);

Testing

composer require --dev phpunit/phpunit
./vendor/bin/phpunit tests/TenancyTest

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email tafhyseni@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

PHP Package Boilerplate

This package was generated using the PHP Package Boilerplate.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-01-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固