alekitto / class-finder

Utility classes to help discover other classes/namespaces
https://alekitto.github.io/class-finder/
MIT License
27 stars 6 forks source link
class-discovery class-finder namespaces-php

ClassFinder

Utility classes to help discover other classes/namespaces

Tests codecov


Installation

$ composer require kcs/class-finder

Usage

Finder helps you to discover classes into your project.

The most common way to discover is to use the provided ComposerFinder. This will search for classes using the auto-generated class loader from composer and resolving PSR-* namespaces accordingly.

Read more in the docs at https://alekitto.github.io/class-finder/

Basic usage

use Kcs\ClassFinder\Finder\ComposerFinder;

$finder = new ComposerFinder();
foreach ($finder as $className => $reflector) {
    // Do magic things...
}

Filtering

You can filter classes using the methods exposed by FinderInterface:

License

This library is released under the MIT license.

Contributions

Contributions are always welcome. Please feel free to open a PR or file an issue.


Thank you for reading
A.