spiral/annotations

This package is abandoned and no longer maintained. No replacement package was suggested.

Annotations parser using strict node grammar

2.14.1 2022-09-12 15:12 UTC

README

Latest Stable Version Build Status Codecov

Package is deprecated. Please, use spiral/attributes instead

Installation

Service does not require any bootloader and can be enabled in spiral application with simple composer dependency.

$ composer require spiral/annotations 

Example

To find all annotated classes:

use Spiral\Annotations;

$locator = new Annotations\AnnotationLocator($classLocator); 

foreach($locator->findClasses(MyAnnotation::class) as $class) {
    dump($class->getClass());
    dump($class->getAnnotation());
}