Zend Studio is a convenient environment to code in PHP, even though it is not currently possible to use it for integrated debugging of PHP-GTK code: its php completion and file management, and phpdoc integration make it very useful for the PHP-GTK environment too. However some settings are necessary to ease its use, due to the specific extensions typically used by PHP-GTK programs:
phpw files for applications, and
gladep for Glade files storing UIs.
Recognizing PHP-GTK files within the Studio IDE
First things first, chances are you've already noticed Zend Studio didn't consider the frequently used
.phpw files to be "Web documents", or even actual PHP, and found how to configure it for them. If you haven't, it's real simple (example given for Zend Studio 5.2.0) :
- Start Zend Studio
- Open the
- Choose the
- Choose the
PHP filesin the top left list
Addon the top right button, near the
File type extensionlist
- Add the extensions needed by PHP-GTK:
phpwwithin this category. Do not include the dot before the extension.
- Continue with the
XML filesection, adding
gladep(glade project files).
- That's it ! You now have access to the full features of the Zend Studio IDE on Drupal components
Generating PHPDocumentor documentation for PHP-GTK files
Zend Studio 5.x comes bundled with PHPDocumentor and some integration work done.
However, Studio does not reconfigure the PHPDocumentor
file types from its internal preferences system,
so when you try and generate documentation using
wizard, you'll stumble on this error:
This time the workaround is not within Zend Studio itself:
although Zend could have integrated this setting into
PHPdocumentor, they didn't do it (yet ?) in version 5.2.0.
The setting is located in file
You can just as well edit it within the IDE while it's up.
You'll find it's a vanilla
with the files to be processed as PHP source listed in
(...skip beginning of file...) [_phpDocumentor_phpfile_exts] php php3 php4 phtml (...skip rest of file...)
All it takes is to add the extensions we need:
(...skip beginning of file...) [_phpDocumentor_phpfile_exts] php php3 php4 phtml phpw (...skip rest of file...)
That's it ! You can now generate docs for your PHP-GTK code from within Zend Studio. Don't forget to add the tagged comments into your code, now !