PHPackages                             rayful/object-tool - 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/object-tool

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

rayful/object-tool
==================

A object relative toolkit.

1.0(8y ago)02811MITPHP

Since Sep 23Pushed 8y ago2 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (1)

ObjectTool
==========

[](#objecttool)

与对象/类有关的工具基类。

### 安装

[](#安装)

composer require rayful/object-tool

### 使用

[](#使用)

##### trait objectTool

[](#trait-objecttool)

包含遍历对象及获得当前对象公开属性的等四个基础方法，多个包里面会用到。

- toArray(): 获取这个类里面的所有公开属性的值，关键方法。（以前的publics方法）
- set(): 把外界的array map设到当前这个对象中去。
- clear(): 清空当前对象的所有值及键。
- reset(): 清空后，再设进去。

#### class ReflectionPropertyX

[](#class-reflectionpropertyx)

ReflectionProperty的扩展，主要是可以把注释里面的元素抽出来，放在tags属性里面，然后通过两个方法获取。

- getTag($name): 把注释里面的@var string，其中var就是$tagName，string就是值。
- getTags(): 把注释里面的属性和值遍历出来。
- 具体用法请见test/test.php文件。

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

3204d 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 (1 commits)")

### Embed Badge

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

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

###  Alternatives

[magiccart/magicslider

Banner slider flexibly to any page on live store.

1723.6k](/packages/magiccart-magicslider)

PHPackages © 2026

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