PHPackages                             method-args/argument - 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. method-args/argument

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

method-args/argument
====================

method argument command

07PHP

Since May 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/xsg5886779/method-argument)[ Packagist](https://packagist.org/packages/method-args/argument)[ RSS](/packages/method-args-argument/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

method-argument
===============

[](#method-argument)

介绍
==

[](#介绍)

Argument的基类可以直接使用。
所有的自定义参数类都需要继承一个Argument的基类进行处理，支持标准判断和操作。

标准操作参考
------

[](#标准操作参考)

```
○ 参数实现属性读取的方式处理。
○ 支持必填项判断。
○ 支持类型判断。
○ 支持自定义字段名设置以及判断规则。
○ 支持一次性必填项错误提示。

```

扩展自定义参数类
--------

[](#扩展自定义参数类)

### 为什么要扩展自定义参数类？###

[](#为什么要扩展自定义参数类)

扩展自定义的参数类目的是为了对基础操作进行二次封装，进行更精细的处理。例如：对默认值的处理、自定义判断规则、对ArgumentBase预设配置默认处理等。

### 扩展能做哪些二次封装？###

[](#扩展能做哪些二次封装)

```
○ 配置protected $defaultFields 属性对参数的默认值预设。
○ 配置protected (boolean) $fullValidationMode 必填项验证模式（true=一次性验证所有必填项/false只要有一个必填项就停止继续验证）
○ 配置protected (array) $verifyFields 设置字段验证规则包括必填项字段列表。
○ 通过method get{参数名}Attribue 方法对参数返回值封装。
○ 通过method set{规则名}Validation 方法创建自定义验证规则。

```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity22

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/c0068e47840c8b5188f21b6ad25f8ba6868ee0d089d9569391a5c3b8929260c4?d=identicon)[xsg5886779](/maintainers/xsg5886779)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/method-args-argument/health.svg)

```
[![Health](https://phpackages.com/badges/method-args-argument/health.svg)](https://phpackages.com/packages/method-args-argument)
```

PHPackages © 2026

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