Edit: This plugin is now renamed to sublime phpdocumentor due to DocBlox being merged with phpdoc
It seems that the editor of the moment is Sublime Text 2 and sadly I have to tip my hat to Gary Rockett for showing it off to me one day.. Since that day, I’ve been a 100% convert. I started to create snippets for our internal codebase at work, as I was fed up of searching for examples for common tasks I could never remember to do, but then I saw this tweet from Stuart Herbert about creating general PHP snippets.
One thing led to another and Stuart set the pace by creating:
These are fantastic plugins which I recommend you install. So, I decided to peak into the PHPUnit one to see if I could create a DocBlox/phpDocumentor Plugin. It turns out you have to write Plugins in Python, which is interesting, since I know very little python. There seemed to be enough code there to get me going, so I now have a working DocBlox/phpDocumentor Plugin.
Once installed, you simply right click in the side bar menu on items you want documentation for. It can do single files and directories..
And once you click “Generate documentation…” you get the console showing the output:
You can configure where the target documentation should be published via the preferences:
and simply update the following options:
There are a few things to point out at this stage:
- My python skills are not great!! But stick with me, I should be able to fix issues if they arise.
- Ideally it would be great to then load the documentation in a browser, but I need to do some more reading to see how to do this on all OS’s using Python.
You can install this in one of two ways: