lee-to/fast-attributes
最新稳定版本:0.3.0
Composer 安装命令:
composer require lee-to/fast-attributes
包简介
Simplifying PHP Attribute Management
关键字:
README 文档
README
Fast Attributes
Usage
// All class attributes $classAttributes = Attributes::for(ClassWithAttributes::class)->get();
// Only SomeAttribute class attributes $someAttributes = Attributes::for(ClassWithAttributes::class) ->attribute(SomeAttribute::class) ->get();
// Only SomeAttribute instance $someAttribute = Attributes::for(ClassWithAttributes::class) ->attribute(SomeAttribute::class) ->first();
// SomeAttribute variable property $someAttribute = Attributes::for(ClassWithAttributes::class) ->attribute(SomeAttribute::class) ->first('variable');
// Method parameter attributes $someAttribute = Attributes::for(ClassWithAttributes::class) ->method('someMethod') ->parameter('variable') ->get();
$someAttribute = Attributes::for(ClassWithAttributes::class) ->constant('VARIABLE') ->property('variable') ->method('someMethod') ->parameter('variable') ->get();
统计信息
- 总下载量: 105.54k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 5
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-24