使用Symfony2的定制标注的简单示例 [英] Simple Example of Custom Annotations using Symfony2
问题描述
我熟悉的<一个href=\"http://docs.doctrine-project.org/projects/doctrine-common/en/latest/reference/annotations.html#annotation-classes\">Doctrine文档有关自定义注释,但我在寻找一个简单的例子。
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?
推荐答案
<一个href=\"http://php-and-symfony.matthiasnoback.nl/2011/12/symfony2-doctrine-common-creating-powerful-annotations/\">Here就是为了创建功能强大的注解Symfony2的使用与常见学说的一个很好的例子。
Here is a good example of using Symfony2 with Doctrine Common in order to create powerful annotations.
这篇关于使用Symfony2的定制标注的简单示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!