Work with doctrine annotation reader
I need for one project to work with class annotation - reed and do some work. Because I already usedoctrine dbal, so I decide to use AnnotationReader.
So the first of all I create my own Annotation class:
@Annotation - this means that this class use as annotation
@Target ("PROPERTY") - use it only for a property. If use on class or method - exception will be throw
We need some class:
Then we need use AnnotationReader of Doctrine with Reflection. So:
Annotation reader don't use composer autoload for some reasons. So you need to include annotation class.
Now you can see all mapping information. Enjoy!