如何在PHP中创建自定义注释?

我想学习如何为我的项目使用和创建自定义注释。我不想使用框架。但是,我愿意为此使用库。

任何准则?怎么做的例子?

例如,假设我要创建自定义ORM:

/*
 *@Table(name="TableName")
 */
class TableName{
    /*
    *@Column(type="int")
    */
    protected $id;

    public static createtabe(){/*creates table with properties defined in the annotation*/}
}
chen192 回答:如何在PHP中创建自定义注释?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3106944.html

大家都在问