PHPackages                             patory/core - 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. patory/core

ActiveLibrary

patory/core
===========

PHP based on Satori Protocol.

00PHP

Since Oct 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/im-patory/patory)[ Packagist](https://packagist.org/packages/patory/core)[ RSS](/packages/patory-core/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Satori PHP :: Patory
====================

[](#satori-php--patory)

Satori Protocol implementation.

Install
-------

[](#install)

The running environment requires PHP 8.1 and above.

Feature
-------

[](#feature)

- Patory\\Api: 请求 API 定义
    - BasicApi
    - (abstract) channel.\*
    - (abstract) friend.\* (由于架构原因，由 User 中拆出)
    - (abstract) guild.\*
    - (abstract) guild.member.\*
    - (abstract) guild.role.\*
    - (abstract) login.\*
    - (abstract) message.\*
    - (abstract) user.\*
- Patory\\Events: API 事件定义
- Patory\\Universal: 通用数据定义
- Patory\\Interval: 内部接口转义
- Patory\\Messager: 消息编码
- Patory\\Element: 消息元素工具类
- Patory\\Auth: 简单鉴权工具
- Patory\\Helper: 其他工具

Patory\\Api
-----------

[](#patoryapi)

所有 API 派生基类都拥有内部魔术方法，以 `Channel` 基类为例：

- `Channel::path('create')`: 生成 URL Path

### Example

[](#example)

```
// 实现 Channel 基类
class Channel extends Patory\Api\Channel
{
    function create(string $channel_id, Patory\Universal\Channel $data) : Patory\Universal\Channel{
        $url = static::path(__FUNCTION__);
        //输出: /v1/channel.create
    }
}
```

Patory\\Element
---------------

[](#patoryelement)

元素内部以 Object 形式流转，通过 toString() 转为标准元素 ``。

```
// 内部
Element = [
    'type' => 'at',
    'attrs' => [
        'id' => '114514',
        'name' => 'Tadokoro Koji',
        'role' => null,
        'type' => null
    ]
];
```

### APIs

[](#apis)

```
$at = new Patory\Element();
```

###  Health Score

12

—

LowBetter than 0% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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://www.gravatar.com/avatar/9e0532f1173344cf53dfc62d8ea5fc3e4f5545f113396cb1cf1f0f33bb1c577b?d=identicon)[Lipraty](/maintainers/Lipraty)

---

Top Contributors

[![Lipraty](https://avatars.githubusercontent.com/u/18106422?v=4)](https://github.com/Lipraty "Lipraty (14 commits)")

### Embed Badge

![Health badge](/badges/patory-core/health.svg)

```
[![Health](https://phpackages.com/badges/patory-core/health.svg)](https://phpackages.com/packages/patory-core)
```

PHPackages © 2026

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