rickselby/consthelpers
最新稳定版本:1.2
Composer 安装命令:
composer require rickselby/consthelpers
包简介
关键字:
README 文档
README
Helper traits to use when using a class with many constants.
Also a place for me to test CI stuff.
Example
class DataRef { use \ConstHelpers\Validating; const POINT_NORTH = 0; const POINT_SOUTH = 1; const POINT_EAST = 2; const POINT_WEST = 3; const POINT_UP = 4; const POINT_DOWN = 5; const ORIENT_NORMAL = 6; const ORIENT_INVERSE = 7; } // Get the list of constants that start with 'POINT_' $consts = DataRef::startsWith('POINT_')); // Validate a value against the constants starting with 'POINT_' if (DataRef::isValidStartsWith($value, 'POINT_')) { ... // Validate against constants matching a regular expression if (DataRef::isValid($value, '/T.*E/')) { ...
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-10-17