定制 scheb/implementation-iterator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

scheb/implementation-iterator

最新稳定版本:v1.0.0

Composer 安装命令:

composer require scheb/implementation-iterator

包简介

Iterates a PSR-4 compliant directory for implementations of a class/interface

README 文档

README

This library creates an iterator for a PSR-4 compliant folder structure and searches it for all implementations/extensions of an interface/class. Abstract implementations and the class itself will be ignored.

Build Status HHVM Status Coverage Status Latest Stable Version License

Usage

$iterator = new \Scheb\ImplementationIterator("src/", "Root\Namespace", "Some\Class\Or\Interface");
foreach ($iterator as $className) {
    echo $className . "\n";
}

Will return something like:

Root\Namespace\Foo\Implementation
Root\Namespace\Bar\OtherImplementation
...

Alternatively you can also have an iterator, which returns ReflectionClass instances instead of the class name:

$iterator = new \Scheb\ImplementationReflectionIterator("src/", "Root\Namespace", "Some\Class\Or\Interface");
foreach ($iterator as $reflection) {
    echo $reflection->getName() . "\n";
}

License

This library is available under the MIT license.

统计信息

  • 总下载量: 11.03k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-22