PHPackages                             rayful/toolkit - 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. rayful/toolkit

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

rayful/toolkit
==============

A toolkit service for rayful PHP packages.

1.3.3(9y ago)04463MITPHP

Since Apr 26Pushed 9y ago1 watchersCompare

[ Source](https://github.com/rayful/toolkit)[ Packagist](https://packagist.org/packages/rayful/toolkit)[ RSS](/packages/rayful-toolkit/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (10)DependenciesVersions (13)Used By (3)

toolkit
=======

[](#toolkit)

睿锋公司开源网络框架及软件包内常用的工具包。

### 安装

[](#安装)

composer require rayful/toolkit

### 使用

[](#使用)

##### trait

[](#trait)

- validate: 验证及自动转换类型
- editor: 根据PHPdoc里面定义的类型自动生成数据编辑器
- shower: 根据PHPdoc里面定义的类型自动生成数据展示器
- objectTool: 包含遍历对象及获得当前对象公开属性的等四个基础方法，多个包里面会用到。

##### 类

[](#类)

- Date: 常用的MongoDate类型的展示类，包含::toString等几个常用方法
- StringTool: 常用的字符串操作类，包括toMongoId等数个字符串方法

##### 关于在Model里面对每个属性的声明

[](#关于在model里面对每个属性的声明)

```
@var:
 * Model类在PHPDoc里面对这个属性的类型的声明
 * 使用场景:editor,shower,validate中的autoConvert()
 * @var string
 * @example string int bool float array string[] MongoDate MongoId ...

@name:
 * Model类在PHPDoc里面对这个属性的标签的声明
 * 使用场景:editor,shower时必选
 * @var string
 * @example 姓名/性别/标题

@input:
 * editor中使用,声明这个属性的输入框类型
 * 使用场景:editor 可选 如果不声明类型，程序还将能自动根据声明的var类型判断
 * @var string
 * @example select/checkbox/radio/textarea

@ignore:
 * editor中使用，声明这个属性是否在某些编辑场景中被忽略
 * 使用场景:editor 可选 默认每个字段都会输出到编辑器中,除非声明ignore
 * @var string
 * @example edit/show

@tips:
 * editor中使用,声明这个属性在输入框后面的提示
 * 使用场景:editor 可选 如果需要在输入框后面增加提示，请声明这个类型
 * @var string

```

###  Health Score

31

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity70

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~42 days

Recently: every ~95 days

Total

12

Last Release

3293d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4504653?v=4)[Kingmax Yang](/maintainers/kingmaxyang)[@kingmaxyang](https://github.com/kingmaxyang)

---

Top Contributors

[![kingmaxyang](https://avatars.githubusercontent.com/u/4504653?v=4)](https://github.com/kingmaxyang "kingmaxyang (8 commits)")

### Embed Badge

![Health badge](/badges/rayful-toolkit/health.svg)

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

###  Alternatives

[spatie/fork

A lightweight solution for running code concurrently in PHP

1.0k3.4M80](/packages/spatie-fork)[silverstripe/redirectedurls

Provides a system for users to configure arbitrary redirections in the CMS

31546.0k11](/packages/silverstripe-redirectedurls)[ghoster/module-outofstockatlast

Magento 2.4.x module Sort Out Of Stock Product At last the product list

62136.7k](/packages/ghoster-module-outofstockatlast)[swentel/nostr-php

Nostr helper library for PHP

6932.1k6](/packages/swentel-nostr-php)[marcw/rss-writer

A simple yet powerful RSS2 feed writer with RSS extensions support (like iTunes podcast tags)

1335.8k](/packages/marcw-rss-writer)[pecl/timezonedb

This extension is a drop-in replacement for the builtin timezone database that comes with PHP.

179.6k](/packages/pecl-timezonedb)

PHPackages © 2026

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