gephart / annotation
Gephart Annotation Component
0.5.1
2024-06-12 11:38 UTC
Requires
- php: >=7.1
Requires (Dev)
- phpmd/phpmd: @stable
- phpstan/phpstan: ^1.7.15
- phpunit/phpunit: 9.5.21
- squizlabs/php_codesniffer: ^3.7.1
README
Dependencies
- PHP >= 7.4
Instalation
composer require gephart/annotation
Using
@AnnotationName value @AnnotationName {"or anything":"in JSON"}
/** * @Route /home/ */ class SuperClass { /** * @Template { * "url": "index.html" * } */ public function index() { } } $reader = new \Gephart\Annotation\Reader(); $annotation = $reader->get("Route", SuperClass::class); // /home/ $annotation = $reader->get("Template", SuperClass::class, "index); // ["url"=>"index.html"]