You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was extending the code generation library schmittjoh/cg-library to add support for traits and interfaces (my fork) because I want to use it in one of my further projects (still in dev!). I was wondering how Propel would look like using this codegen lib in conjunction with twig. So I hacked some lines together to get an impression. I pushed the code: builder-refactoring branch.
Basically the code is located in Propel\Generator\Builder\Model and the parts are available in Propel\Runtime\Parts.
This would offer:
Programmatically add code
Twig as template system for method bodies or strings (for being used in docblock)
Create code templates and use reflection to template them (PhpMethod::fromReflection(...))
Move static code into traits and just include them
Include abstract methods in traits and implement them on the object
With static code I mean code, that is the same across all generated objects and doesn't vary on model contents
Let me know what you think
The text was updated successfully, but these errors were encountered:
Hey,
I was extending the code generation library schmittjoh/cg-library to add support for traits and interfaces (my fork) because I want to use it in one of my further projects (still in dev!). I was wondering how Propel would look like using this codegen lib in conjunction with twig. So I hacked some lines together to get an impression. I pushed the code: builder-refactoring branch.
Basically the code is located in
Propel\Generator\Builder\Model
and the parts are available inPropel\Runtime\Parts
.This would offer:
PhpMethod::fromReflection(...)
)Let me know what you think
The text was updated successfully, but these errors were encountered: