flexic/attribute-reader
最新稳定版本:1.2.0
Composer 安装命令:
composer require flexic/attribute-reader
包简介
Provides an reader for php attributes.
关键字:
README 文档
README
Reader to get attributes from a class, method or property.
Installation
Run
composer require flexic/attribute-reader
to install flexic/attribute-reader.
Get Attributes
$reflectionClass = new \ReflectionClass(MyClass::class); $attributeReader = new Flexic\Attributes\Reader(); $attributeReader->getAttributes($reflectionClass); // Returns list of given attributes $attributeReader->getAttribute($reflectionClass, MyAttribute::class); // Returns first attribute of given type $attributeReader->hasAttribute($reflectionClass, MyAttribute::class); // Checks if attribute is defined on class. $attributeReader->findClassesWithAttribute(MyAttribute::class); // Get all classes where Attribute is defined.
License
This package is licensed using the GNU License.
Please have a look at LICENSE.md.
统计信息
- 总下载量: 166
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-10-09