cakephp / api_generator

[Unmaintained] Official CakePHP API Generator Git Repository
113 stars 31 forks source link

Rebuild how classes are indexed #12

Open ghost opened 11 years ago

ghost commented 11 years ago

Created by Mark Story, 11th Dec 2010. (originally Lighthouse ticket #34):


Right now classes are indexed using some mildly hacky regular expressions. It would be a big improvement to use token_get_all() and parse the token stream for class, interface, global function definitions and build the index that way. This would also allow for dependencies to be mapped as well. By looking for extends or implements a full dependency graph could be constructed.

This would have two main benefits. It would allow for ApiGenerator to work on non-cake apps more effectively. Currently its kind of a kludge to get it to work on non-cake apps. It would also allow for neat things like visual graphs to be created with tools like graphviz or canvas.

The indexing process could look something like.