2017 © Pedro Peláez
 

library implementation-iterator

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

image

scheb/implementation-iterator

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

  • Sunday, March 22, 2015
  • by Scheb
  • Repository
  • 1 Watchers
  • 2 Stars
  • 4,337 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 7 % Grown

The README.md

scheb/implementation-iterator

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., (*1)

Build Status HHVM Status Coverage Status Latest Stable Version License, (*2)

Usage

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

Will return something like:, (*3)

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

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

$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., (*5)

The Versions

22/03 2015

dev-master

9999999-dev https://github.com/scheb/implementation-iterator

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

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Christian Scheb

reflection iterator implementation

22/03 2015

v1.0.0

1.0.0.0 https://github.com/scheb/implementation-iterator

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

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Christian Scheb

reflection iterator implementation