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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With