使用 Symfony2 自定义注释的简单示例 [英] Simple Example of Custom Annotations using Symfony2
本文介绍了使用 Symfony2 自定义注释的简单示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我熟悉 Doctrine Documentation 关于自定义注释,但我正在寻找一个简单的例子.
I am familiar with the Doctrine Documentation about custom annotations, but I am looking for a simple example.
我想在用户创建或更新小部件时使用注释(用户、日期、操作等)在审计表中创建一个条目.
I would like to create an entry in a audit table using an annotation (user, date, action, etc.) when a user creates or updates a widget.
你能给我举个简单的例子吗?
Can you point me to a simple example?
推荐答案
这里是一个很好的例子,使用 Symfony2 和 Doctrine Common 来创建强大的注释.
Here is a good example of using Symfony2 with Doctrine Common in order to create powerful annotations.
这篇关于使用 Symfony2 自定义注释的简单示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文