PHPackages                             shiren/yao - 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. shiren/yao

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

shiren/yao
==========

易学六爻

v1.4.2(3y ago)4481MITPHP

Since Oct 9Pushed 3y ago1 watchersCompare

[ Source](https://github.com/10-in/yao)[ Packagist](https://packagist.org/packages/shiren/yao)[ RSS](/packages/shiren-yao/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

实仁-六爻
=====

[](#实仁-六爻)

当前项目废弃
======

[](#当前项目废弃)

这个过程本就不应该在服务端实现，意义不大。现在已经改写为js版本，在前端实现，请参考 [seerlegend/six](https://github.com/seerlegend/six)

安装
--

[](#安装)

```
composer require shiren/yao
```

使用
--

[](#使用)

- 爻值对应

    - No 名称 符号
    - 0 阴爻 \[ - - \]
    - 1 阳爻 \[ --- \]
    - 2 动阴爻 \[ -x- \]
    - 3 动阳爻 \[ -0- \]
- 命令行查看结果

    ```
    $eye = \Shiren\Yao\Eye::create([1, 2, 0, 0, 0, 3], [6, 10], [2, 2])->look();
    \Shiren\Yao\Visible::instance($eye)->show(true);

    //庚戌月丙寅日
    //山雷颐之地泽临 木
    //6 　 青 兄 -0- 寅[　 　 　　　] 酉 官
    //5 　 玄 父 - - 子[　 　 伏巳子] 　 　
    //4 世 白 才 - - 戌[空 建 　　　] 　 　
    //3 　 蛇 才 - - 辰[　 破 　　　] 　 　
    //2 　 勾 兄 -x- 寅[　 　 　　　] 卯 兄
    //1 应 朱 父 --- 子[　 　 　　　] 　
    ```

- 接口调用 ```
    // 需要自己转换参数
    $data = \Shiren\Yao\Eye::create([1, 2, 0, 0, 0, 3], [6, 10], [2, 2])->look()->toArray();
    // 以下无需自己转换参数
    $eye = \Shiren\Yao\Eye::create([1, 2, 0, 0, 0, 3], [6, 10], [2, 2])->look();
    $data = \Shiren\Yao\Visible::instance($eye)->show();
    ```

    - -&gt;show()结果

    ```
    {
      "name": [ "山雷颐", "地泽临"],
      "element": "木",
      "times": [
        {
          "no": 0, "type": 1, "sy": "应", "animal": "朱", "peace": "", "z": "子", "relation": "父", "empty": "", "m": "破", "d": "",
          "change": null
        },
        {
          "no": 1, "type": 2, "sy": "", "animal": "勾", "peace": "", "z": "寅", "relation": "兄", "empty": "", "m": "", "d": "",
          "change": { "z": "卯", "relation": "兄", "empty": "", "m": "", "d": "" }
        },
        {
          "no": 2, "type": 0, "sy": "", "animal": "蛇", "peace": "", "z": "辰", "relation": "才", "empty": "", "m": "", "d": "",
          "change": null
        },
        {
          "no": 3, "type": 0, "sy": "世", "animal": "白", "peace": "", "z": "戌", "relation": "才", "empty": "空", "m": "", "d": "",
          "change": null
        },
        {
          "no": 4, "type": 0, "sy": "", "animal": "玄", "peace": "巳子", "z": "子", "relation": "父", "empty": "", "m": "破", "d": "",
          "change": null
        },
        {
          "no": 5, "type": 3, "sy": "", "animal": "青", "peace": "", "z": "寅", "relation": "兄", "empty": "", "m": "", "d": "",
          "change": { "z": "酉", "relation": "官", "empty": "", "m": "", "d": ""}
        }
      ],
      "dayCol": [2, 2],
      "monthCol": [6, 6],
      "front": 33,
      "back": 3
    }
    ```

参考demo
------

[](#参考demo)

[demo](demo/foo.php)

LICENSE
-------

[](#license)

MIT

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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.

###  Release Activity

Cadence

Every ~109 days

Recently: every ~135 days

Total

6

Last Release

1183d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/89234810?v=4)[实印](/maintainers/10in-tech)[@10in-tech](https://github.com/10in-tech)

---

Top Contributors

[![10in-tech](https://avatars.githubusercontent.com/u/89234810?v=4)](https://github.com/10in-tech "10in-tech (21 commits)")[![soonio](https://avatars.githubusercontent.com/u/18730233?v=4)](https://github.com/soonio "soonio (7 commits)")

### Embed Badge

![Health badge](/badges/shiren-yao/health.svg)

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

###  Alternatives

[tempest/highlight

Fast, extensible, server-side code highlighting

696889.5k76](/packages/tempest-highlight)[ichhabrecht/content-defender

Define allowed or denied content element types in your backend layouts

953.2M25](/packages/ichhabrecht-content-defender)[mageplaza/magento-2-seo-extension

Magento 2 SEO extension

141527.1k2](/packages/mageplaza-magento-2-seo-extension)[cmsmaxinc/filament-system-versions

A comprehensive Filament plugin that provides real-time visibility into all package versions within your Filament PHP application. This essential developer tool creates a centralized dashboard where you can instantly view, monitor, and track the current versions of all installed packages in your project and what the latest version is.

1330.9k](/packages/cmsmaxinc-filament-system-versions)[refinery29/league-lazy-event

Provides a LazyListener for use with league/event which allows for lazy fetching of actual listeners.

1423.3k](/packages/refinery29-league-lazy-event)

PHPackages © 2026

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