{"repo":"spatie/php-structure-discoverer","free":true,"listed":false,"github":"https://github.com/spatie/php-structure-discoverer","clone":"git clone https://github.com/spatie/php-structure-discoverer.git","description":"Automatically discover classes within your PHP application","language":"PHP","stars":178,"topics":["discover","laravel","php"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Automatically discover classes, interfaces, enums, and traits within your PHP application With this package, you'll be able to discover structures in your PHP application that fulfill certain conditions quickly. For example, you could search for classes implementing an interface: As an added benefit, it has a built-in cache functionality that makes the whole process fast in production. The package is not only limited to classes but can also find enums, interfaces, and traits and has extra metadata for each structure. Support us We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products. We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall. Installation You can install the package via composer: If you're using Laravel, then you can also publish the config file with the following command: This is the contents of the published config file: Usage You always need to define in which directories you want to look for structures: It is possible to look in multiple directories like this: You can get the structures as such: Which will return an array of class FCQN, and because no conditions were added, the package will return all classes, enums, interfaces, and traits. You only discover classes like this: Interfaces like this: Enums like this: A","default_branch":null,"files":null,"tree":[],"storefront":"/r/spatie","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/spatie/php-structure-discoverer/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}