henderjon/flags
最新稳定版本:v0.0.6
Composer 安装命令:
composer require henderjon/flags
包简介
a flag parser
README 文档
README
Flags takes an object, parses it's properties and methods and evaluates a given array (e.g. $argv) and populates the object with the given array.
Flags uses Attributes to parse/echo documentation.
For example usage, see the example
special cases
- To set a bool true simply use it (e.g.
-var). To set it's value it is required to use the equal sign (e.g. -var=false) -helpor--helpwill always print DocStings- when combing custom types, nullables, default values, and shadow methods, it can be tricky to make sure that everything that OUGHT to be nullable, is so
- errors/exception in the vein of
Argument #1 ($v) must be of type $TYPE, null giventhat means that the expected type of the property, shadow function parameter, and shadow function return type don't match. Specifically, nullable types require everything else to be nullable, especially when it's a complex type that is nullable and defaults to null as a value.
统计信息
- 总下载量: 4.51k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2024-05-16