PHPackages                             darsyn/class-finder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. darsyn/class-finder

AbandonedLibrary[Utility &amp; Helpers](/categories/utility)

darsyn/class-finder
===================

Class Finder by Darsyn for searching for end-user PHP classes.

3.0.2(7y ago)62044MITPHPPHP &gt;=5.4

Since May 20Pushed 7y ago2 watchersCompare

[ Source](https://github.com/darsyn/class-finder)[ Packagist](https://packagist.org/packages/darsyn/class-finder)[ RSS](/packages/darsyn-class-finder/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (6)Versions (10)Used By (0)

Darsyn's Class Finder [![Build Status](https://camo.githubusercontent.com/2d853f09483a1173682fdc2014339865c300025fad03c647e0f25cef6f28b11c/68747470733a2f2f7472617669732d63692e6f72672f64617273796e2f636c6173732d66696e6465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/darsyn/class-finder)
==============================================================================================================================================================================================================================================================================================================

[](#darsyns-class-finder-)

A library for searching for classes in a specific root directory and namespace. Originally intended for searching for classes in all registered Symfony bundles (similar to finding bundle commands), it can find classes that stick to a standard without having to manually register each of those classes. Various filters can be specified, such as:

- In a sub-directory/namespace.
- Have a specific file extension.
- End with custom suffix.
- Implement or extend a parent class or interface.

Usually an array containing fully-qualified class names (as strings) is returned, but passing `true` as the fourth parameter to the `findClasses()` method will return an array of `ReflectionClass` instances instead. Very useful in certain situations.

License
-------

[](#license)

This project is licensed under [MIT](http://j.mp/mit-license).

Dependencies
------------

[](#dependencies)

This project uses Symfony's [Finder](http://symfony.com/doc/current/components/finder.html) component to search for classes, and PHP's [Reflection extension](http://php.net/manual/en/book.reflection.php) to process class definitions. It also assumes you are using [Composer](https://getcomposer.org) or a similar autoloader.

If you plan to use this library with the Symfony framework, it also utilises the [HTTP Kernel](http://symfony.com/doc/current/components/http_kernel/introduction.html) component; this will already be a dependency of your project however.

Example
-------

[](#example)

```
