Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Annotation Framework

I know that frameworks like Synfony2, Doctrine2, PHPUnit, etc... have support for annonations but I want to add in annotation support for my library but don't want to write the parser/caching myself. Does anyone know if there is a library I can include/hook into my code and be able to start using annonations or at least provide a large set of functionality that does parsing/caching of the annonations for me?

like image 503
ryanzec Avatar asked Dec 01 '11 19:12

ryanzec


1 Answers

Reflections are definitely the right path, yet you surely don't want to do all the parsing. Nette Framework has a class you might want to try: https://github.com/nette/nette/blob/master/Nette/Reflection/AnnotationsParser.php

like image 107
Mikulas Dite Avatar answered Sep 25 '22 09:09

Mikulas Dite