Auto-adding PHPdoc Blocks to all files in a project


First off, I love the product. It's made my programming life far easier than I could ever have imagined. I was wondering if it could make it just a bit easier now.

Is there a way to tell the program toadd a predefined PHPDoc Block to all existing files in a project? I understand that I can have a pre-defined block added when I create a file, but if I want to retroactively go back and re-create the block on all files is there a way to do that?

I appreciate your help.


Comment actions Permalink

Hi Jon,

As far as I'm aware -- no.

You can try "Replace in Path" functionality .. and write some complex regex .. but I'm not sure about this.

The only other thought that comes into my mind (excluding using some 2rd party text editor/tool) is to write some custom PHP script that will traverse whole folder structure and add such header in all PHP files

Comment actions Permalink

I figured as much.

No problem, I'll just do some old fashioned grunt work and go file-by-file. Was going to have to eventually anyway to properly document the code blocks after adding them anyway.

Thanks a million for your quick answer - it's appreciated!


Please sign in to leave a comment.