Get Kohana classes to auto-complete in Zend Studio

Sick of typing $db = new Database(); and not getting any code completion? This controller generates a lookup table for Zend studio that cures this issue.

Download

Download version 1.3 (Released 4 Jan 2010, tested with Kohana 2.3.4)

Install

  1. Save the file as zend_autocomplete.php in your application/controllers directory. Yes the filename does matter!
  2. Load http://yoursite/index.php/zend_autocomplete or http://yoursite/zend_autocomplete in a browser or run it on the CLI. A file will be generated in application/cache with the class names.
  3. Whenever you add a new module or write another controller, just run the code again.

FAQ

Q: People have solved this problem before by writing a lookup file by hand. Why develop this code?
Writing a lookup file by hand is fine for the initial core Kohana classes, but when working on a large project with a number of developers it's a nightmare keeping the lookup file up-to-date. Automating the process saves a lot of time!
I've found a bug or have a feature suggestion!
Please let me know!