17 feb. 2010 : PHP-GTK Application descriptions can now be submitted in Brazilian Portuguese too. Thanks Bruno Bandeira !.
German and Italian still missing: who will contribute the translated categories for these languages ? Contact the team to offer your translations !
One of the most useful aspects of Integrated Development Environments (IDE), like Zend Studio or Eclipse PDT, is the ability to obtain code completion information when typing PHP source.
Regrettably, however, none of these IDEs is by default instrumented to provide code completion for PHP-GTK developers. But there is a way to make them seem PHP-GTK-aware.
These IDEs are able to provide code completion not only for prebuilt extension code, but also for user-level PHP code. This gives us a way to provide it to PHP-GTK developers : all it takes is a "stub" file containing PHP declarations equivalent to the PHP-GTK2 classes, interfaces, and their methods and constants.
Due to the sheer volume of the PHP-GTK API, it is out of the question to build such a stub file by hand, as this would be too much work and almost immediately obsolete, but luckily the PHP5 Reflection API enables reverse-engineering the PHP-GTK extension interface back to a PHP file that will be mostly equivalent to the original API.
The attached Gtk_Dumper script produces such a stub file.
php-gtk-skeletons.php, preferably in a separate directory.There are a few limitations due to differences between C (in which GTK and PHP extensions are coded), and PHP itself:
Traversable Interface, which can simply not be created in user PHP code. The prototypes are therefore missing it, but the information is available as comments in the stub fileforeach() and unset() are replaced by foreach_method and unset_method() wherever they are appear. Remove _method in your PHP-GTK programsGdk::XOR, Gdk::AND and Gdk::OR are replaced by Gdk::XOR_Blit, Gdk::<code>AND_Blit, and Gdk::OR_Blit respectively. Remove _Blit in your PHP-GTK programs| Attachment | Size |
|---|---|
| php-gtk-prototypes.zip | 58.14 KB |
| Gtk_Dumper.php.txt | 24.92 KB |
Recent comments
5 weeks 5 days ago
11 weeks 4 days ago
13 weeks 2 days ago
19 weeks 5 days ago
21 weeks 3 hours ago
21 weeks 1 day ago
22 weeks 2 days ago
23 weeks 1 day ago
33 weeks 6 days ago
34 weeks 13 hours ago