PHPackages                             weimob-cloud/php-ability-sdk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. weimob-cloud/php-ability-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

weimob-cloud/php-ability-sdk
============================

WeimobCloud PHP Ability Sdk

21.9k—8.3%3PHP

Since Jul 30Pushed 1y agoCompare

[ Source](https://github.com/weimob-tech/php-ability-sdk)[ Packagist](https://packagist.org/packages/weimob-cloud/php-ability-sdk)[ RSS](/packages/weimob-cloud-php-ability-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-ability-sdk
===============

[](#php-ability-sdk)

微盟云开放平台的PHP项目的能力SDK，根据开放能力的元数据规范，提供一套PHP语言的能力定义，帮助开发者减少开发成本，使其可以快速的接入微盟云的开放生态。

介绍
--

[](#介绍)

### 功能列表

[](#功能列表)

- SPI能力定义
    - Interface
    - Request
    - Response
- MSG能力定义
    - Listener
    - Message

### 项目结构

[](#项目结构)

```
|-- composer.json
|-- README.md
|-- LICENSE
|-- .gitignore
|-- src/                         # 源码目录
|   |-- Weimob/Wos/Cloud/        # Wos开放能力
|       |-- Spi/                 # SPI能力定义
|       |-- Msg/                 # MSG能力定义
|   |-- Weimob/Xinyun/Cloud/     # Xinyun开放能力
|       |-- Spi/                 # SPI能力定义
|       |-- Msg/                 # MSG能力定义

```

快速开始
----

[](#快速开始)

1. 使用composer管理包，在php项目工程的composer.json添加依赖

    ```
    "require": {
    	...
    	"weimob-cloud/php-ability-sdk": "${last_version}"
    }
    ```
2. 安装包，使用composer命令

    - composer install
    - composer update
    - composer dumpautoload
    - composer ... [详细文档](https://getcomposer.org/)
3. Spi实现

    ```
    //实现SPI的逻辑
    class DemoWosSpiImpl extends BaseFramework implements PaasWeimobShopCouponPaasBatchLockCouponService
    {
        public function invoke(WeimobShopCouponPaasBatchLockCouponRequest $request): WeimobShopCouponPaasBatchLockCouponResponse
        {
            $paasResponse = new WeimobShopCouponPaasBatchLockCouponResponse();
            $paasResponseCode = new PaasResponseCode();
            $paasResponseCode->setErrcode("success");
            $paasResponseCode->setErrmsg("success");

            $data = new WeimobShopCouponPaasBatchLockCouponData();
            $data->setSuccess(true);
            $paasResponse->setData($data);
            $paasResponse->setCode($paasResponseCode);

            return $paasResponse;
        }
    }

    //注册SPI实现
    $spiRegistry->register("demoSpiImpl",\WeimobCloudBootDemo\Ability\Spi\Wos\DemoWosSpiImpl::class,SpecTypeEnum::WOS);
    ```
4. Msg实现

    ```
    //实现消息订阅逻辑
    class DemoWosMsgListerner extends BaseFramework implements WeimobCrmBalanceChangeBalanceChangeListener
    {
        public function onMessage(WeimobMessage $message) : WeimobMessageAck
        {
            $weimobMessageAck = new WeimobMessageAck();
            $code = new Code();
            $code->setErrcode("success");
            $code->setErrmsg("成功");
            $weimobMessageAck->setCode($code);

            return $weimobMessageAck;
        }
    }

    //订阅消息
    $msgSubscription->subscribe(new MsgInfo("weimob_crm.balance.change","balanceChange"),\WeimobCloudBootDemo\Ability\Msg\Wos\DemoWosMsgListerner::class,SpecTypeEnum::WOS);
    ```

使用文档
----

[](#使用文档)

- [能力文档](http://doc.weimobcloud.com/list?tag=2396&menuId=19&childMenuId=1&isold=2)
- [开发者入驻](http://doc.weimobcloud.com/word?menuId=46&childMenuId=47&tag=2970&isold=2)
- [应用开发](http://doc.weimobcloud.com/word?menuId=53&childMenuId=54&tag=2488&isold=2)
- [PHP工程](http://doc.weimobcloud.com/word?menuId=53&childMenuId=54&tag=2488&isold=2)

贡献方法
----

[](#贡献方法)

- 申请加入weimob\_tech

联系我们
----

[](#联系我们)

-

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/90382714?v=4)[微盟技术中心](/maintainers/weimob-tech)[@weimob-tech](https://github.com/weimob-tech)

---

Top Contributors

[![weimob-jichao](https://avatars.githubusercontent.com/u/132634955?v=4)](https://github.com/weimob-jichao "weimob-jichao (6 commits)")[![axibx](https://avatars.githubusercontent.com/u/32378554?v=4)](https://github.com/axibx "axibx (5 commits)")[![StevenGao568](https://avatars.githubusercontent.com/u/133832029?v=4)](https://github.com/StevenGao568 "StevenGao568 (3 commits)")[![yejunwei-weimob](https://avatars.githubusercontent.com/u/132969450?v=4)](https://github.com/yejunwei-weimob "yejunwei-weimob (3 commits)")

### Embed Badge

![Health badge](/badges/weimob-cloud-php-ability-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/weimob-cloud-php-ability-sdk/health.svg)](https://phpackages.com/packages/weimob-cloud-php-ability-sdk)
```

###  Alternatives

[tobion/retry

A generic library to retry an operation in case of an error. You can configure the behavior like the exceptions to retry on.

16396.8k](/packages/tobion-retry)[franzose/laravel-smpp

SMS sending via SMPP protocol for Laravel framework.

3941.6k1](/packages/franzose-laravel-smpp)[cammac/carbony

convert from/to Hijri and Gregorian

2443.0k](/packages/cammac-carbony)[steevanb/symfony-container-introspection

Get all Symfony Container informations you need: registered services, instanciated services etc

1034.5k](/packages/steevanb-symfony-container-introspection)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
