Looking to add code macros, specifically for ZF2 workflow

I'm working in Apigility, which is essentially just a flavor of Zend Framework 2.

My problem is I am repeating a lot of skeleton code to construct API Services, and I would like to design some code templates.

is PHPStorm's Code templates meant for this kind of work flow?  I searched Coding Macros but that didn't bring up much..

I'd love to right click on a folder in my project with a drop down menu for new

New -> MySQL connected ZF2 Service
New -> Generic ZF2 Resource Class


Thank you,

3 comments
Comment actions Permalink

Hi there,

For file templates: "Settings | File & Code Templates". Such file templates then would be available under "New..." (File | New...) -- http://blog.jetbrains.com/webide/2013/01/rapid-file-creation-with-file-templates/

For in-code templates: "Settings | Live Templates" -- http://blog.jetbrains.com/webide/2012/10/high-speed-coding-with-custom-live-templates/

0
Comment actions Permalink

Is there any way for a multi-file template?

specifically Apigility uses a Module system that has many starter files/directories.

If not, I'll start to look at how Apigility creates new Services in it's admin console and expand from there..iy

Thanks Andriy,

0

Please sign in to leave a comment.