As I mentioned in a previous phpStorm post, phpStorm is my favourite PHP IDE.
Since I do a lot of work with phpBB3, I have a couple tips for code completion.
There are basically 2 main phpBB3 code libs that do not have completion and are used a lot.
The DBAL and ACM, though the DBAL is used the most, I put the caching in as well, just in case its needed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
// Open phpBB3 root/common.php // Add doc blocks above $cache = new cache(); $db = new $sql_db(); // So they look like this /** @var $cache acm */ $cache = new cache(); /** @var $db dbal_mysql */ $db = new $sql_db(); // This should provide code completion for most if not all query functions in phpBB3 and also cache functions |
What we are doing is setting the reference for the class to the global var using the @var annotation.
This will give you almost complete code completion for any SQL query functions you need to use from the DBAL.
Also including the phpBB3 caching mechanism ACM.
There are others that require class assigning annotations as well.
Like the custom profile field class to name one.
So when you work with these, just annotate your instance var referencing it to the class like we did in the above code.
Then you should have full completion for your phpBB3 project.
Stay tuned for more phpStorm tips.