If you are adventurous you might have a look at the PHP & Web Toolkit source code here:
bitbucket.org/mariofischer/php-web-toolkit/.
Beware: Since this was my first (and nearly only) project in Objective-C with Xcode I’m sure it’s a mess. The repository wasn’t meant to be public in the beginning but only for my personal use, therefore I committed just the whole project – which probably isn’t the best way to go. Nevertheless with some experience it should be possible to build the plugin.