-
-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
似乎 getDescription / getComment 更合适? #9
Comments
命名还是很纠结的事情,我觉得都可以 |
|
这里的作用我认为本来就是模糊的,到底是简约的意思: 另外 <?php
namespace ImiDemo\HttpDemo\MainServer\Enum;
use Imi\Enum\BaseEnum;
use Imi\Enum\Annotation\EnumItem;
class Status extends BaseEnum
{
/**
* @EnumItem(text="正确", comment="状态是正确的")
*/
const YES = 1;
/**
* @EnumItem(text="错误", comment="状态是错误的")
*/
const NO = 0;
}
// 使用:
echo Status::getData(Status::YES)->comment; |
好吧,我还是比较赞成 Laravel 的思想,顾名思义,简洁明了。这种看起来扩展性很强的设计会让人觉得无从下手,不得不阅读文档才能明确。 |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/Yurunsoft/IMI/releases/tag/v0.2.1
The text was updated successfully, but these errors were encountered: