螺旋/注释

此包已被废弃,不再维护。没有建议的替代包。

使用严格node语法的注释解析器

2.14.1 2022-09-12 15:12 UTC

README

Latest Stable Version Build Status Codecov

包已弃用。请使用 spiral/attributes 代替

安装

服务不需要任何引导程序,并且可以通过简单的composer依赖在螺旋应用程序中启用。

$ composer require spiral/annotations 

示例

查找所有注释类

use Spiral\Annotations;

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

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