Download the PHP package darsyn/class-finder without Composer
On this page you can find all versions of the php package darsyn/class-finder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download darsyn/class-finder
More information about darsyn/class-finder
Files in darsyn/class-finder
Package class-finder
Short Description Class Finder by Darsyn for searching for end-user PHP classes.
License MIT
Informations about the package class-finder
Darsyn's 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
This project is licensed under MIT.
Dependencies
This project uses Symfony's Finder component to search for classes, and PHP's Reflection extension to process class definitions. It also assumes you are using Composer or a similar autoloader.
If you plan to use this library with the Symfony framework, it also utilises the HTTP Kernel component; this will already be a dependency of your project however.
Example
Symfony Integration
You may also register this library as a service. To do so, add the following to app/config/services.yml
(or in the
bundle that uses this library in your preferred configuration format):
Note: Remember that the kernel
service is synthetic, and cannot be used until Symfony injects the correct kernel
instance into the container.
Authors and Contributing
Current authors include:
- Zander Baldwin [[email protected]](mailto:[email protected]) (on GitHub).
All contributions are welcome, don't forget to add your name here in the pull request!