Last active
August 29, 2015 14:05
-
-
Save spolischook/0bd36a2cacbd92b05c31 to your computer and use it in GitHub Desktop.
Get annotation from class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require __DIR__ . '/../vendor/autoload.php'; | |
| use Doctrine\Common\Annotations\AnnotationReader; | |
| require __DIR__ . '/../src/Kotoblog/Annotation/Mapping.php'; | |
| $annotationReader = new AnnotationReader(); | |
| $reflectionClass = new ReflectionClass('\\Kotoblog\\Entity\\Blogpost'); | |
| foreach ($reflectionClass->getProperties() as $reflectionProperty) { | |
| var_dump($annotationReader->getPropertyAnnotations($reflectionProperty)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment