nette / php-generator

🐘 Generates neat PHP code for you. Supports new PHP 8.3 features.
https://doc.nette.org/php-generator
Other
2.11k stars 138 forks source link

Load a class from a file template #79

Closed fnash closed 3 years ago

fnash commented 3 years ago

Hello Thank you for this lib and its well designed api.

Is it possible to load a class from a file?

This could avoid loading a class in the current namespace to use reflection. It could make php tools based on this library possible. Like refactoring tool. The usecase here is to manipulate files wherever they are, independently from the current execution context.

Something like Factory::fromClassFile

Thanks

dg commented 3 years ago

Yeah, this could be implemented. I would appreciate it if you could support this project.