mia3/koseki
Composer 安装命令:
composer require mia3/koseki
包简介
Library to quickly find classes that implement specific interfaces
README 文档
README
This library helps you to quickly and easily find classes that implement an interface or extend from a base class. It uses the registered interfaces of composer to find/build the registry. The registry itself is cached in the temporary directory returned by "sys_get_temp_dir()". The cache entry will automatically be recached if the the composer autoload_file changes. But it can does not pick up new/changes files, for development you should use the parameter "forceRecache". it's still wicked fast.
Usage cached
$implementations = ClassRegister::getImplementations('Acme\Package\MyCoolInterface');
Usage with forceRecache
$implementations = ClassRegister::getImplementations('Acme\Package\MyCoolInterface', TRUE);
That's it :)
Installation
composer require mia3/koseki
Ignoring incompatible/failing files
There are 2 choices where you can specify files that should be ignored by the ClassRegistry.
.koseki-ignore.gitattributes
The syntax is based on the common .gitignore format: https://git-scm.com/docs/gitignore#_pattern_format
The ClassRegister will automatically add a file to the root .koseki-ignore file if it
encounters a fatal error while including a class file.
统计信息
- 总下载量: 50
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2015-12-11