PHPackages                             uniondrug/common - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. uniondrug/common

ActiveLibrary

uniondrug/common
================

Common tools for uniondrug/framework

2.1(8y ago)011MITPHP

Since Feb 23Pushed 8y ago2 watchersCompare

[ Source](https://github.com/uniondrug/common)[ Packagist](https://packagist.org/packages/uniondrug/common)[ RSS](/packages/uniondrug-common/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

uniondrug/common 框架通用功能
=======================

[](#uniondrugcommon-框架通用功能)

- 安装
- 目录结构
- 微服务用法
    - 微服务客户端
    - 如何使用服务端
- 单元测试

安装
--

[](#安装)

```
composer require uniondrug/common

```

目录结构
----

[](#目录结构)

```
/ vendor/uniondrug/common/src
├── Controllers
│   ├── ServiceClientController.php         // Service客户端
│   ├── ServiceServerController.php         // Service服务端
│   └── TestsController.php                 // 单元测试调度
├── Helpers
│   ├── ImageSize.php
│   ├── Session.php
│   ├── SessionClient.php
│   └── SessionData.php
├── Interfaces
│   ├── RelateChildInterface.php
│   ├── RelateFetchInterface.php
│   ├── RelateWriteInterface.php
│   ├── SingleChildInterface.php
│   ├── SingleFetchInterface.php
│   └── SingleWriteInterface.php
├── Services
│   ├── FrameworkService.php
│   ├── RelateChildService.php
│   ├── RelateService.php
│   ├── SingleChildService.php
│   └── SingleService.php

```

微服务用法
-----

[](#微服务用法)

### Helpers

[](#helpers)

### Interfaces

[](#interfaces)

### Services

[](#services)

> Service继承, 基于接口`RelateChildInterface`、`RelateFetchInterface`、`RelateWriteInterface`、`SingleChildInterface`、`SingleFetchInterface`、`SingleWriteInterface`预定义的通用Service。

```
