jayzeng/php-enum
Composer 安装命令:
composer require jayzeng/php-enum
包简介
PHP enum class that OO way to manipulate enums
README 文档
README
Project website: (http://jayzeng.github.com/PHPEnum/)
##Usage:
class StubUtilEnum extends Enum { const ONE = 1; const TWO = 2; const THREE = 3; const FOUR = "four"; } // Retrieve value mapped to the label $StubUtilEnum->getValue('ONE'); // returns 1 $StubUtilEnum->getValue('FOUR'); // returns four $StubUtilEnum->getValues(); // array // Determine if a label exists $StubUtilEnum->hasLabel(1); // true $StubUtilEnum->hasLabel('oops'); // false
##Details See https://github.com/jayzeng/PHPEnum/blob/master/Tests/Src/EnumTest.php
##Issues & Development
- Source hosted GitHub
- Report issues, questions, feature requests on GitHub Issues
##How to release new version?
- RELEASE_VERSION - version number
- RELEASE_MESSAGE - release message
make release RELEASE_VERSION="0.1" RELEASE_MESSAGE="v0.1 is released"
##Author: Jay Zeng, e-mail: jayzeng@jay-zeng.com
统计信息
- 总下载量: 89
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-03-01